File U_0001-XauFileName-reset-bsize-when-malloc-failed.patch of Package libXau

From 67beb3d0bc41c3416902c858f595b35306f76704 Mon Sep 17 00:00:00 2001
From: Fuminobu TAKEYAMA <ftake@geeko.jp>
Date: Sun, 29 Sep 2013 09:21:05 -0700
Subject: [PATCH 1/2] XauFileName: reset bsize when malloc failed

https://bugs.freedesktop.org/show_bug.cgi?id=69929

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

diff --git a/AuFileName.c b/AuFileName.c
index 0904273..63d4956 100644
--- a/AuFileName.c
+++ b/AuFileName.c
@@ -70,8 +70,10 @@ XauFileName (void)
 	if (buf)
 	    free (buf);
 	buf = malloc (size);
-	if (!buf)
+	if (!buf) {
+	    bsize = 0;
 	    return NULL;
+	}
 
         if (!atexit_registered) {
             atexit(free_filename_buffer);
-- 
1.8.1.4

openSUSE Build Service is sponsored by