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=]
This commit is contained in:
Akira TAGOH 2020-10-30 17:39:37 +09:00
parent 447b9ccc7d
commit 8815641571
1 changed files with 1 additions and 1 deletions

View File

@ -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;