From 265b0bc9bb12a3eceb1ea39c5250acba94abeea3 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 29 May 2020 17:35:56 -0700 Subject: Silence a strncpy() warning. --- popt/popt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'popt') 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: -- cgit v1.2.1