Commit 88156415 authored by Akira TAGOH's avatar Akira TAGOH
Browse files

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=]
parent 447b9ccc
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment