From: sin Date: Fri, 19 Feb 2016 13:40:44 +0000 (+0000) Subject: Fix strlcpy() size argument X-Git-Tag: v1.0~92^2~6 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=81ec2605165985c4e53800a6707469227b9335a2;p=nnn.git Fix strlcpy() size argument It should be the size of the destination buffer, not the source. In this case, both src and dest have the same size. --- diff --git a/noice.c b/noice.c index 4d032d37..6b04d4e0 100644 --- a/noice.c +++ b/noice.c @@ -598,7 +598,7 @@ nochange: goto nochange; } /* Save history */ - strlcpy(oldpath, path, sizeof(path)); + strlcpy(oldpath, path, sizeof(oldpath)); strlcpy(path, dir, sizeof(path)); /* Reset filter */ strlcpy(fltr, ifilter, sizeof(fltr));