aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcstr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-22 09:17:57 +0100
committermarha <marha@users.sourceforge.net>2012-02-22 09:17:57 +0100
commit6baac61e6ca9cd314e689dfe7f84771aad08c66e (patch)
tree2a8a059fc83d3f7acc1034071ed3a9f7ff3c0027 /fontconfig/src/fcstr.c
parent0ae7710db53515dab4a35c33ba9a030bbfc2ac5b (diff)
downloadvcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.tar.gz
vcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.tar.bz2
vcxsrv-6baac61e6ca9cd314e689dfe7f84771aad08c66e.zip
fontconfig libX11 libxcb mesa pixman xserver git update 22 Feb 2012
Diffstat (limited to 'fontconfig/src/fcstr.c')
-rw-r--r--fontconfig/src/fcstr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index 8b94ecba5..b712e5daf 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -50,14 +50,16 @@ FcStrCopy (const FcChar8 *s)
FcChar8 *
FcStrPlus (const FcChar8 *s1, const FcChar8 *s2)
{
- int l = strlen ((char *)s1) + strlen ((char *) s2) + 1;
+ int s1l = strlen ((char *) s1);
+ int s2l = strlen ((char *) s2);
+ int l = s1l + s2l + 1;
FcChar8 *s = malloc (l);
if (!s)
return 0;
FcMemAlloc (FC_MEM_STRING, l);
- strcpy ((char *) s, (char *) s1);
- strcat ((char *) s, (char *) s2);
+ memcpy (s, s1, s1l);
+ memcpy (s + s1l, s2, s2l + 1);
return s;
}