Guard against too many key-value pairs

This commit is contained in:
Arun Prakash Jana 2020-03-01 18:59:27 +05:30
parent db129c9120
commit 5533e38fbb
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 1 deletions

View File

@ -2915,7 +2915,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items)
++nextkey;
}
if (!maxitems)
if (!maxitems || maxitems > 100)
return FALSE;
*arr = calloc(maxitems, sizeof(kv));