Fixed stack overflow in X11_CreateWindow() (thanks, rapha and Brad!).
authorRyan C. Gordon <icculus@icculus.org>
Sat, 24 May 2014 21:06:40 -0400
changeset 8785 b74a32894c02
parent 8784 605c4b0ef03d
child 8786 5e8f02536cd4
Fixed stack overflow in X11_CreateWindow() (thanks, rapha and Brad!). 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.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Sat May 24 19:49:03 2014 -0400
+++ b/src/video/x11/SDL_x11window.c	Sat May 24 21:06:40 2014 -0400
@@ -361,7 +361,7 @@
     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) &&