From: Holger Schemel Date: Sat, 27 Aug 2022 08:55:09 +0000 (+0200) Subject: fixed crash bug when accessing invalid group data for broken level files X-Git-Tag: 4.3.3.0~71 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=530042f134f8d59f80a7c71168d65edc0da1be10;p=rocksndiamonds.git fixed crash bug when accessing invalid group data for broken level files Thanks to Quipyowert for finding and fixing this bug! --- diff --git a/src/files.c b/src/files.c index 45f4097f..49fe4856 100644 --- 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