]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Silence a strncpy() warning.
authorWayne Davison <wayne@opencoder.net>
Sat, 30 May 2020 00:35:56 +0000 (17:35 -0700)
committerWayne Davison <wayne@opencoder.net>
Sat, 30 May 2020 00:35:56 +0000 (17:35 -0700)
popt/popt.c

index ec6f3bd8be7420575eb713eeaf83b63ec7e26793..5d927f782dcbad36085db6f607a24509b5e09db9 100644 (file)
@@ -626,7 +626,7 @@ expandNextArg(/*@special@*/ poptContext con, const char * s)
            pos = te - t;
            t = realloc(t, tn);
            te = t + pos;
-           strncpy(te, a, alen); te += alen;
+           memcpy(te, a, alen+1); te += alen;
            continue;
            /*@notreached@*/ /*@switchbreak@*/ break;
        default: