summaryrefslogtreecommitdiff
path: root/cat
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@acm.org>2016-01-31 12:24:45 -0800
committerTim Kientzle <kientzle@acm.org>2016-01-31 12:24:45 -0800
commit86adcf859bcf90c5026ed5e60d685299ac130995 (patch)
treeaf5cfb9967e9509473f246c88300f5e44c3c1f9d /cat
parentf2ac501a99d2e5a7d0488c911dde41f91c2ecdf0 (diff)
downloadlibarchive-86adcf859bcf90c5026ed5e60d685299ac130995.tar.gz
Bring along a trailing null when guessing the path to the program under test
Diffstat (limited to 'cat')
-rw-r--r--cat/test/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cat/test/main.c b/cat/test/main.c
index 54a7d01e..8c414da1 100644
--- a/cat/test/main.c
+++ b/cat/test/main.c
@@ -2659,7 +2659,7 @@ main(int argc, char **argv)
exit(1);
}
memmove(testprogdir + strlen(pwd) + 1, testprogdir,
- strlen(testprogdir));
+ strlen(testprogdir) + 1);
memcpy(testprogdir, pwd, strlen(pwd));
testprogdir[strlen(pwd)] = '/';
}