aboutsummaryrefslogtreecommitdiff
path: root/libXau
diff options
context:
space:
mode:
Diffstat (limited to 'libXau')
-rw-r--r--libXau/AuFileName.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libXau/AuFileName.c b/libXau/AuFileName.c
index 7cedfcc5b..37c8b6283 100644
--- a/libXau/AuFileName.c
+++ b/libXau/AuFileName.c
@@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <X11/Xauth.h>
#include <X11/Xos.h>
+#include <assert.h>
#include <stdlib.h>
static char *buf = NULL;
@@ -69,6 +70,7 @@ XauFileName (void)
if ((size > bsize) || (buf == NULL)) {
if (buf)
free (buf);
+ assert(size > 0);
buf = malloc (size);
if (!buf) {
bsize = 0;