From: Holger Schemel Date: Sun, 30 Apr 2017 18:55:53 +0000 (+0200) Subject: fixed bug which could cause a crash due to an array index overflow X-Git-Tag: 4.0.1.0~45 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3b6e79911d74a8c1d28e33e0eb8b943c04d9ae7b;p=rocksndiamonds.git fixed bug which could cause a crash due to an array index overflow --- diff --git a/src/init.c b/src/init.c index d5a66835..8a741fcb 100644 --- a/src/init.c +++ b/src/init.c @@ -413,7 +413,7 @@ void InitFontGraphicInfo() int special = property_mapping[i].ext3_index; int graphic = property_mapping[i].artwork_index; - if (font_nr < 0) + if (font_nr < 0 || font_nr >= NUM_FONTS) continue; if (IS_SPECIAL_GFX_ARG(special))