From: Tim Kientzle Date: Sun, 31 Jan 2016 20:24:45 +0000 (-0800) Subject: Bring along a trailing null when guessing the path to the program under test X-Git-Tag: v3.1.900a~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86adcf859bcf90c5026ed5e60d685299ac130995;p=thirdparty%2Flibarchive.git Bring along a trailing null when guessing the path to the program under test --- diff --git a/cat/test/main.c b/cat/test/main.c index 54a7d01eb..8c414da14 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)] = '/'; } diff --git a/cpio/test/main.c b/cpio/test/main.c index b10ab1e45..580112744 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -2660,7 +2660,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)] = '/'; } diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 3cd8766b4..b39c2bf78 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -2658,7 +2658,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)] = '/'; } diff --git a/tar/test/main.c b/tar/test/main.c index d60a9dca5..33a6364b2 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -2660,7 +2660,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)] = '/'; }