We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
Summary: De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-23 05:53 UTC by Nitz
Modified: 2016-10-08 00:26 UTC (History)
0 users

See Also:


Attachments
Patch for videodata NULL check (729 bytes, patch)
2015-04-23 05:53 UTC, Nitz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitz 2015-04-23 05:53:37 UTC
Created attachment 2129 [details]
Patch for videodata NULL check

In X11_DispatchEvent(_THIS) function 

SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;

Here videodata can be NULL, So we should apply NULL check before de-reference

Patch is attached.
Comment 1 Sam Lantinga 2016-10-08 00:26:56 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/5cf8c66c9c66

When did you see this happen? This should never happen in practice.