mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcursor.git
synced 2025-12-20 07:00:18 +01:00
XcursorImageLoadCursor: return failure if _XcursorGetDisplayInfo fails
Error: Null pointer dereference (CWE 476)
Read from null pointer 'info'
at line 615 of src/cursor.c in function 'XcursorImageLoadCursor'.
Function '_XcursorGetDisplayInfo' may return constant 'NULL' at line 134, called at line 597.
Null pointer introduced at line 134 of src/display.c in function '_XcursorGetDisplayInfo'.
[ This bug was found by the Parfait 0.3.7 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
2b8d373bdd
commit
8229cf75b3
1 changed files with 3 additions and 0 deletions
|
|
@ -601,6 +601,9 @@ XcursorImageLoadCursor (Display *dpy, const XcursorImage *image)
|
|||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
if (!info)
|
||||
return 0;
|
||||
|
||||
core.src_image = XCreateImage (dpy, NULL, 1, ZPixmap,
|
||||
0, NULL, image->width, image->height,
|
||||
32, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue