mirror of
https://github.com/jarun/nnn.git
synced 2025-03-19 04:49:49 +00:00
Guard against too many key-value pairs
This commit is contained in:
parent
db129c9120
commit
5533e38fbb
1 changed files with 1 additions and 1 deletions
|
@ -2915,7 +2915,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items)
|
||||||
++nextkey;
|
++nextkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!maxitems)
|
if (!maxitems || maxitems > 100)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
*arr = calloc(maxitems, sizeof(kv));
|
*arr = calloc(maxitems, sizeof(kv));
|
||||||
|
|
Loading…
Add table
Reference in a new issue