aboutsummaryrefslogtreecommitdiff
path: root/libXau
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-30 09:00:43 +0200
committermarha <marha@users.sourceforge.net>2013-09-30 09:00:43 +0200
commit3aaead2ee2e0f925b33c1ccbde7fa3c0b119d064 (patch)
treeb5487ebc7c6056e0b248afc471edf40b90a3b0b4 /libXau
parent1245204b2091d108a8688ff7f749f2c6cc830381 (diff)
parenta12cf779e828ec70da714832e1eaa730119fe10c (diff)
downloadvcxsrv-3aaead2ee2e0f925b33c1ccbde7fa3c0b119d064.tar.gz
vcxsrv-3aaead2ee2e0f925b33c1ccbde7fa3c0b119d064.tar.bz2
vcxsrv-3aaead2ee2e0f925b33c1ccbde7fa3c0b119d064.zip
Merge remote-tracking branch 'origin/released'
* origin/released: git update fontconfig mesa libXau pixman xkeyboard-config 30 Sep 2013
Diffstat (limited to 'libXau')
-rw-r--r--libXau/AuFileName.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libXau/AuFileName.c b/libXau/AuFileName.c
index 93335bc0f..e5ad5a372 100644
--- a/libXau/AuFileName.c
+++ b/libXau/AuFileName.c
@@ -69,12 +69,14 @@ XauFileName (void)
return NULL;
}
size = strlen (name) + strlen(&slashDotXauthority[1]) + 2;
- if (size > bsize) {
+ if ((size > bsize) || (buf == NULL)) {
if (buf)
free (buf);
buf = malloc (size);
- if (!buf)
+ if (!buf) {
+ bsize = 0;
return NULL;
+ }
if (!atexit_registered) {
atexit(free_filename_buffer);