fixed potential buffer overflow bug
authorHolger Schemel <info@artsoft.org>
Wed, 22 Sep 2021 19:35:12 +0000 (21:35 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 22 Sep 2021 19:35:12 +0000 (21:35 +0200)
src/libgame/setup.c

index 6c5250286d5b11e06b1e4342fc2bd55fa5ce0569..0a406540224696e012e1243fe9944407a62a4863 100644 (file)
@@ -4848,7 +4848,7 @@ static void SaveLevelSetup_LastSeries_Ext(boolean deactivate_last_level_series)
 
   for (i = 0; last_level_series[i] != NULL; i++)
   {
-    char token[strlen(TOKEN_STR_LAST_LEVEL_SERIES) + 10];
+    char token[strlen(TOKEN_STR_LAST_LEVEL_SERIES) + 1 + 10 + 1];
 
     sprintf(token, "%s.%03d", TOKEN_STR_LAST_LEVEL_SERIES, i);