From: Wayne Davison Date: Sat, 30 May 2020 00:35:56 +0000 (-0700) Subject: Silence a strncpy() warning. X-Git-Tag: v3.2.0pre1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=265b0bc9bb12a3eceb1ea39c5250acba94abeea3;p=thirdparty%2Frsync.git Silence a strncpy() warning. --- diff --git a/popt/popt.c b/popt/popt.c index ec6f3bd8..5d927f78 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -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: