diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-01-06 17:10:40 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-01-09 13:36:29 +1000 |
commit | 863d2ad5c02cccde9a4d1a392a7cae78d001c8a9 (patch) | |
tree | 48faca6bcc043a1757b3ab3802e691d76cab9c96 /dix/events.c | |
parent | 5493a67ec256d22a8a41597a345d8e1c54d6e335 (diff) |
CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab()
CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL.
This return value is not checked, and can cause NULL pointer dereferences.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/events.c b/dix/events.c index 2f0605ef5..acf97cc10 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3956,6 +3956,8 @@ CheckPassiveGrabsOnWindow(WindowPtr pWin, return NULL; tempGrab = AllocGrab(NULL); + if (tempGrab == NULL) + return NULL; /* Fill out the grab details, but leave the type for later before * comparing */ |