aboutsummaryrefslogtreecommitdiff
path: root/libXau/AuFileName.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-04-08 08:20:47 +0200
committermarha <marha@users.sourceforge.net>2013-04-08 08:20:47 +0200
commita4505330e3469b6956348812ff2d6c24f812a8ba (patch)
treecf2b88c771188580ab585f763d2e7a0309ecab26 /libXau/AuFileName.c
parent44fb3db38c5148666f62c78e10fc37bb20ed5c5c (diff)
parent95fb19d661154ba8cfc6c793a0daa25657294b3b (diff)
downloadvcxsrv-a4505330e3469b6956348812ff2d6c24f812a8ba.tar.gz
vcxsrv-a4505330e3469b6956348812ff2d6c24f812a8ba.tar.bz2
vcxsrv-a4505330e3469b6956348812ff2d6c24f812a8ba.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libXau mesa xserver xkeyboard-config git update 8 Apr 2013
Diffstat (limited to 'libXau/AuFileName.c')
-rw-r--r--libXau/AuFileName.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libXau/AuFileName.c b/libXau/AuFileName.c
index 473fad110..090427387 100644
--- a/libXau/AuFileName.c
+++ b/libXau/AuFileName.c
@@ -57,9 +57,8 @@ XauFileName (void)
name = getenv ("HOME");
if (!name) {
#ifdef WIN32
- (void) strcpy (dir, "/users/");
if ((name = getenv("USERNAME"))) {
- (void) strcat (dir, name);
+ snprintf(dir, sizeof(dir), "/users/%s", name);
name = dir;
}
if (!name)
@@ -81,7 +80,7 @@ XauFileName (void)
bsize = size;
}
- strcpy (buf, name);
- strcat (buf, slashDotXauthority + (name[1] == '\0' ? 1 : 0));
+ snprintf (buf, bsize, "%s%s", name,
+ slashDotXauthority + (name[1] == '\0' ? 1 : 0));
return buf;
}