Skip to content

Commit

Permalink
Fixed stack overflow in X11_CreateWindow() (thanks, rapha and Brad!).
Browse files Browse the repository at this point in the history
This should be a "long" which on a 64-bit system is likely to be > 32-bits,
 causing XGetICValues() to write past the end of the variable (and stack).

Fixes Bugzilla #2513.
  • Loading branch information
icculus committed May 25, 2014
1 parent 4db368e commit dd5277d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/x11/SDL_x11window.c
Expand Up @@ -361,7 +361,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
Atom _NET_WM_WINDOW_TYPE_NORMAL;
Atom _NET_WM_PID;
Atom XdndAware, xdnd_version = 5;
Uint32 fevent = 0;
long fevent = 0;

#if SDL_VIDEO_OPENGL_GLX || SDL_VIDEO_OPENGL_EGL
if ((window->flags & SDL_WINDOW_OPENGL) &&
Expand Down

0 comments on commit dd5277d

Please sign in to comment.