[Xcb-commit] xcb/util-cursor: 2 commits - cursor
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jul 9 07:52:01 UTC 2023
cursor/load_cursor.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 103bccad6f4a421ede6a0ef2eecc2749ff9be083
Author: Thomas E. Dickey <dickey at invisible-island.net>
Date: Mon May 3 20:25:43 2021 -0400
cppcheck style-fixes in _XcursorThemeInherits
Copied from libxcursor at f807ac9c786714ef4e86ad7edfa60f92baf0b4a6
Signed-off-by: Thomas E. Dickey <dickey at invisible-island.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/cursor/load_cursor.c b/cursor/load_cursor.c
index bffd3cd..c8d587b 100644
--- a/cursor/load_cursor.c
+++ b/cursor/load_cursor.c
@@ -91,7 +91,6 @@ _XcursorThemeInherits (const char *full)
if (!strncmp (line, "Inherits", 8))
{
char *l = line + 8;
- char *r;
while (*l == ' ') l++;
if (*l != '=') continue;
l++;
@@ -99,7 +98,7 @@ _XcursorThemeInherits (const char *full)
result = malloc (strlen (l) + 1);
if (result)
{
- r = result;
+ char *r = result;
while (*l)
{
while (XcursorSep(*l) || XcursorWhite (*l)) l++;
commit 12ea0a8599ecba7663899d7e6ab82f3a27e506f0
Author: shubham shrivastav <shubham.sh at samsung.com>
Date: Fri Jun 5 13:36:22 2015 -0700
Insufficient memory for terminating null of string in _XcursorThemeInherits
Copied from libxcursor at 897213f36baf6926daf6d192c709cf627aa5fd05
Reported-by: @ithinkapps in libxcb-cursor issue #11
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/cursor/load_cursor.c b/cursor/load_cursor.c
index 7cd53cf..bffd3cd 100644
--- a/cursor/load_cursor.c
+++ b/cursor/load_cursor.c
@@ -96,7 +96,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;
More information about the xcb-commit
mailing list