aboutsummaryrefslogtreecommitdiffstats
path: root/cursor/xcursor.c
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2014-01-10 14:43:48 -0800
committerKristian Høgsberg <krh@bitplanet.net>2014-01-15 10:46:09 -0800
commit02952d040cce73c167eaaafe94748a253cd74f02 (patch)
treec20563f6d4c9c95c20629277de45333815cd67a8 /cursor/xcursor.c
parentcursor: check for memory allocation errors (diff)
downloadwayland-02952d040cce73c167eaaafe94748a253cd74f02.tar
wayland-02952d040cce73c167eaaafe94748a253cd74f02.tar.gz
wayland-02952d040cce73c167eaaafe94748a253cd74f02.tar.bz2
wayland-02952d040cce73c167eaaafe94748a253cd74f02.tar.lz
wayland-02952d040cce73c167eaaafe94748a253cd74f02.tar.xz
wayland-02952d040cce73c167eaaafe94748a253cd74f02.tar.zst
wayland-02952d040cce73c167eaaafe94748a253cd74f02.zip
xcursor: don't proceed if XcursorImageCreate failed
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'cursor/xcursor.c')
-rw-r--r--cursor/xcursor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cursor/xcursor.c b/cursor/xcursor.c
index 7a9662a..f9d9669 100644
--- a/cursor/xcursor.c
+++ b/cursor/xcursor.c
@@ -488,6 +488,8 @@ _XcursorReadImage (XcursorFile *file,
/* Create the image and initialize it */
image = XcursorImageCreate (head.width, head.height);
+ if (image == NULL)
+ return NULL;
if (chunkHeader.version < image->version)
image->version = chunkHeader.version;
image->size = chunkHeader.subtype;