nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d1fcc5351e43577c59bd9c89699f7241cea8052a
parent 88167511f60d36ade74e209eb5b9318a828f6954
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 28 Feb 2020 19:30:50 +0530

Fix lint

Diffstat:
Msrc/nnn.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -2921,6 +2921,10 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items) kvarr = *arr; *envcpy = strdup(ptr); + if (!*envcpy) { + xerror(); + return FALSE; + } ptr = *envcpy; nextkey = ptr; @@ -2948,7 +2952,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items) } if (i < maxitems) { - if (*kvarr[i - 1].val == '\0') + if (kvarr[i - 1].val && *kvarr[i - 1].val == '\0') return FALSE; kvarr[i].key = '\0'; }