[Commits] SDL: Wayland: Fixed crash if memory mapping failed while creatin...

libsdl.org revision control commits-owner at libsdl.org
Wed Mar 16 14:15:23 PDT 2016


details:   https://hg.libsdl.org/SDL/rev/f49e8a97c214
changeset: 10120:f49e8a97c214
user:      Philipp Wiesemann <philipp.wiesemann at arcor.de>
date:      Wed Mar 16 22:09:39 2016 +0100
description:
Wayland: Fixed crash if memory mapping failed while creating a custom cursor.

diffstat:

 src/video/wayland/SDL_waylandmouse.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r ac9831ff70d1 -r f49e8a97c214 src/video/wayland/SDL_waylandmouse.c
--- a/src/video/wayland/SDL_waylandmouse.c	Wed Mar 16 22:09:23 2016 +0100
+++ b/src/video/wayland/SDL_waylandmouse.c	Wed Mar 16 22:09:39 2016 +0100
@@ -130,6 +130,7 @@
         d->shm_data = NULL;
         fprintf (stderr, "mmap () failed\n");
         close (shm_fd);
+        return -1;
     }
 
     shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);


More information about the commits mailing list