From ce1fd719cfc9d70fc49fb6f2a195eb574c8916a1 Mon Sep 17 00:00:00 2001 From: phobos2077 Date: Sun, 6 Nov 2016 00:15:25 +0700 Subject: [PATCH] Limit maximum string length for arrays to prevent certain strange crashes --- sfall/Arrays.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfall/Arrays.h b/sfall/Arrays.h index 0971b98c..90c94fa0 100644 --- a/sfall/Arrays.h +++ b/sfall/Arrays.h @@ -4,7 +4,7 @@ #include #include -#define ARRAY_MAX_STRING (1024) // maximum length of string to be stored as array key or value +#define ARRAY_MAX_STRING (255) // maximum length of string to be stored as array key or value #define ARRAY_MAX_SIZE (100000) // maximum number of array elements, // so total maximum memory/disk footprint of one array is: 16 + (ARRAY_MAX_STRING + 8) * ARRAY_MAX_SIZE