From: Arun Prakash Jana Date: Wed, 6 May 2020 13:33:29 +0000 (+0530) Subject: Fix broken dir read from pipe X-Git-Tag: v3.2~48 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ce06bf15d6e61b24c3cebe50b3ce9a9200364bda;p=nnn.git Fix broken dir read from pipe --- diff --git a/src/nnn.c b/src/nnn.c index 0bafe234..17199cd3 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4273,6 +4273,8 @@ static void readpipe(int fd, char **path, char **lastname, char **lastdir) if (len <= 0) return; + /* Terminate the path read */ + g_buf[len] = '\0'; nextpath = g_buf; } else if (op == 'l') { /* Remove last list mode path, if any */