]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #301
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 5 Jul 2019 02:12:52 +0000 (07:42 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 5 Jul 2019 02:12:52 +0000 (07:42 +0530)
src/nnn.c

index 8b0df44c870cb081b3f588efedee318fcf335cc6..8e27608cd2f3d8d7d71cae9e34817a6a92be09bc 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2420,7 +2420,9 @@ static char *get_output(char *buf, const size_t bytes, const char *file,
 
 static bool getutil(const char *util)
 {
-       if (!get_output(g_buf, CMD_LEN_MAX, "which", util, NULL, FALSE))
+       char buf[8];
+
+       if (!get_output(buf, 8, "which", util, NULL, FALSE))
                return FALSE;
 
        return TRUE;