mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 19:03:27 +08:00
f465f24d73
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. |
||
---|---|---|
acinclude | ||
android-project | ||
build-scripts | ||
cmake | ||
debian | ||
docs | ||
include | ||
src | ||
test | ||
VisualC | ||
VisualC-WinRT | ||
visualtest | ||
Xcode | ||
Xcode-iOS | ||
.hgignore | ||
Android.mk | ||
autogen.sh | ||
BUGS.txt | ||
cmake_uninstall.cmake.in | ||
CMakeLists.txt | ||
configure | ||
configure.in | ||
COPYING.txt | ||
CREDITS.txt | ||
INSTALL.txt | ||
Makefile.in | ||
Makefile.minimal | ||
Makefile.pandora | ||
Makefile.psp | ||
Makefile.wiz | ||
README-SDL.txt | ||
README.txt | ||
sdl2-config.cmake.in | ||
sdl2-config.in | ||
sdl2.m4 | ||
sdl2.pc.in | ||
SDL2.spec.in | ||
SDL2Config.cmake | ||
TODO.txt | ||
VisualC.html | ||
WhatsNew.txt |
Simple DirectMedia Layer (SDL) Version 2.0 --- https://www.libsdl.org/ Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games. More extensive documentation is available in the docs directory, starting with README.md Enjoy! Sam Lantinga (slouken@libsdl.org)