From 897213f36baf6926daf6d192c709cf627aa5fd05 Mon Sep 17 00:00:00 2001 From: shubham shrivastav <shubham.sh@samsung.com> Date: Fri, 5 Jun 2015 13:36:22 -0700 Subject: [PATCH] Insufficient memory for terminating null of string in _XcursorThemeInherits Fix does one byte of memory allocation for null termination of string. https://bugs.freedesktop.org/show_bug.cgi?id=90857 Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- src/library.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library.c b/src/library.c index f08e8f0..fd040ce 100644 --- a/src/library.c +++ b/src/library.c @@ -180,7 +180,7 @@ _XcursorThemeInherits (const char *full) if (*l != '=') continue; l++; while (*l == ' ') l++; - result = malloc (strlen (l)); + result = malloc (strlen (l) + 1); if (result) { r = result; -- 2.18.0