mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 13:37:56 +00:00
syswm: prevent buffer overflow if SDL and app have different config headers.
This only affects Wayland and DirectFB, as a Unix system generally has X11 support. Other platforms also have different sizes for the C union in question, but are likely the only target for that platform, etc. Apps that might run on Wayland or DirectFB will need to be compiled against new headers from an official 2.0.6 release, or be prepared to force the x11 target, or not use SDL_GetWindowWMInfo(). Fixes Bugzilla #3428.
This commit is contained in:
@@ -280,8 +280,9 @@ struct SDL_SysWMinfo
|
||||
} vivante;
|
||||
#endif
|
||||
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
/* Make sure this union is always 64 bytes (8 64-bit pointers). */
|
||||
/* Be careful not to overflow this if you add a new target! */
|
||||
Uint8 dummy[64];
|
||||
} info;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user