File U_0002-XauFileName-always-go-through-buf-allocation-if-buf-.patch of Package libXau

From 304a11be4727c5a7feeb2501e8e001466f8ce84e Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun, 29 Sep 2013 09:23:45 -0700
Subject: [PATCH 2/2] XauFileName: always go through buf allocation if buf is
 NULL

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
---
 AuFileName.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/AuFileName.c b/AuFileName.c
index 63d4956..7cedfcc 100644
--- a/AuFileName.c
+++ b/AuFileName.c
@@ -66,7 +66,7 @@ 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);
-- 
1.8.1.4