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:
parent
447b9ccc7d
commit
8815641571
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue