Commit 897213f3 authored by shubham shrivastav's avatar shubham shrivastav Committed by Alan Coopersmith
Browse files

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's avatarKeith Packard <keithp@keithp.com>
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent edf52212
...@@ -180,7 +180,7 @@ _XcursorThemeInherits (const char *full) ...@@ -180,7 +180,7 @@ _XcursorThemeInherits (const char *full)
if (*l != '=') continue; if (*l != '=') continue;
l++; l++;
while (*l == ' ') l++; while (*l == ' ') l++;
result = malloc (strlen (l)); result = malloc (strlen (l) + 1);
if (result) if (result)
{ {
r = result; r = result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment