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

Summary: De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
Product: SDL Reporter: Nitz <nitin.j4>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 2.0.3   
Hardware: x86   
OS: Linux   
Attachments: Patch for videodata NULL check

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.