From 8815641571574b72e8c5fbd906938467888da090 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 30 Oct 2020 17:39:37 +0900 Subject: [PATCH] Use memcpy instead of strcpy To work around a warning with GCC10 on Win32 warning: '__builtin___strncpy_chk' specified bound depends on the length of the source argument [-Wstringop-overflow=] --- src/fcxml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fcxml.c b/src/fcxml.c index 3b44368..3f22581 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -3613,7 +3613,7 @@ _FcConfigParse (FcConfig *config, #elif HAVE_STRERROR char *tmp = strerror (errno_); size_t len = strlen (tmp); - strncpy (ebuf, tmp, FC_MIN (BUFSIZ, len)); + memcpy (ebuf, tmp, FC_MIN (BUFSIZ, len)); ebuf[FC_MIN (BUFSIZ, len)] = 0; #else ebuf[0] = 0;