]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix filename truncation if O_NOLOC set
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 27 Feb 2020 16:11:06 +0000 (21:41 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 27 Feb 2020 16:11:06 +0000 (21:41 +0530)
src/nnn.c

index 1d031601c5b2145744812859e2d87798a9e5e047..44450e2ee20014106ab5af659a29882666c81be8 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2994,7 +2994,7 @@ static wchar_t *unescape(const char *str, uint maxcols)
        size_t lencount = 0;
 
 #ifdef NOLOCALE
-       memset(wbuf, 0, sizeof(NAME_MAX + 1));
+       memset(wbuf, 0, sizeof(NAME_MAX + 1) * sizeof(wchar_t));
 #endif
 
        /* Convert multi-byte to wide char */