Browse Source

Guard against too many key-value pairs

master
Arun Prakash Jana 4 years ago
parent
commit
5533e38fbb
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/nnn.c

+ 1
- 1
src/nnn.c View File

@@ -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…
Cancel
Save