sdl2_frt/src
Sam Lantinga f465f24d73 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
..
atomic
audio wave: SDL_LoadWAV now supports 24-bit audio. 2017-09-07 10:56:08 -04:00
core Fixed compile warning 2017-08-28 14:45:19 -07:00
cpuinfo SDL_cpuinfo.c: add os/2 support to SDL_GetCPUCount() and SDL_GetSystemRAM(). 2017-08-21 13:00:40 -07:00
dynapi vulkan: use "unsigned int" instead of "unsigned" 2017-09-06 19:35:36 -04:00
events Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
file Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits 2017-09-09 08:36:37 -07:00
filesystem
haptic Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
joystick keep joystick thread from waking unnecessarily, and from possibly blocking for 300ms at shutdown if a joystick was just plugged in 2017-09-08 07:15:47 -07:00
libm
loadso
main Removed the need for libSDL2main.a on Android, and separated JNI initialization out for other integrations 2017-08-28 14:34:15 -07:00
power
render
stdlib Fixed 64-bit build warning 2017-09-08 15:08:03 -07:00
test Fixed bug 3806 - Fixes for MSVC compiler warnings 2017-09-08 18:26:25 -07:00
thread Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
timer
video Fixed bug 3808 - fix a typo in SDL_stretch.c 2017-09-09 08:20:56 -07:00
SDL_assert_c.h
SDL_assert.c
SDL_dataqueue.c
SDL_dataqueue.h
SDL_error_c.h
SDL_error.c
SDL_hints.c
SDL_internal.h
SDL_log.c
SDL.c