File U_Insufficient-memory-for-terminating-null-of-string-i.patch of Package libXcursor.8341
Git-commit: 897213f36baf6926daf6d192c709cf627aa5fd05
Patch-Mainline: Upstream
Author: shubham shrivastav <shubham.sh@samsung.com>
Subject: Insufficient memory for terminating null of string in _XcursorThemeInherits
Signed-off-by: Michal Srb <msrb@suse.com>
References: bnc#1103511 fdo#90857 CVE-2015-9262
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.16.4