summaryrefslogtreecommitdiff
path: root/src/fcxml.c
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2020-10-30 17:39:37 +0900
committerAkira TAGOH <akira@tagoh.org>2020-11-02 14:25:01 +0900
commit8815641571574b72e8c5fbd906938467888da090 (patch)
treecb5b90e8d191eb2a23813f02dd94428b3f0cb396 /src/fcxml.c
parent447b9ccc7d03bf953d1f1c4708ca16c56c1511ec (diff)
downloadfontconfig-8815641571574b72e8c5fbd906938467888da090.tar.gz
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=]
Diffstat (limited to 'src/fcxml.c')
-rw-r--r--src/fcxml.c2
1 files changed, 1 insertions, 1 deletions
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;