From 4cd47bcc3c1ea57bb37b7dc400d8f9f98d499c2a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 12 Dec 2019 14:29:59 +0100 Subject: [PATCH] better use memcpy --- src/microhttpd/digestauth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index fe078009..98ce433a 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c @@ -480,9 +480,9 @@ lookup_sub_value (char *dest, if (size > len) size = len; size--; - strncpy (dest, - q1, - size); + memcpy (dest, + q1, + size); dest[size] = '\0'; return size; }