projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa0293
)
fixed crash bug when accessing invalid group data for broken level files
author
Holger Schemel
<info@artsoft.org>
Sat, 27 Aug 2022 08:55:09 +0000
(10:55 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 27 Aug 2022 09:23:28 +0000
(11:23 +0200)
Thanks to Quipyowert for finding and fixing this bug!
src/files.c
patch
|
blob
|
history
diff --git
a/src/files.c
b/src/files.c
index 45f4097f85f734dcb3645116b2bd616285a48726..49fe48569f6ddad83e5d5d78144075a60f07093d 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-3388,6
+3388,9
@@
static int LoadLevel_GRPX(File *file, int chunk_size, struct LevelInfo *level)
struct ElementInfo *ei = &element_info[element];
struct ElementGroupInfo *group = ei->group;
+ if (group == NULL)
+ return -1;
+
xx_ei = *ei; // copy element data into temporary buffer
xx_group = *group; // copy group data into temporary buffer