SDL/src
Sam Lantinga 5a3f134b94 Fixed bug 3340 - SDL_BlitScaled causes access violation in some cases.
Simon Hug

The SDL_BlitScaled function runs into an access violation for specific blit coordinates and surface sizes. The attached testcase blits a 800x600 surface to a 1280x720 surface at the coordinates -640,-345 scaled to 1280x720. The blit function that moves the data then runs over and reads after the pixel data from the src surface causing an access violation.

I can't say where exactly it goes wrong, but I think it could have something to do with the rounding in SDL_UpperBlitScaled. final_src.y is 288 and final_src.h is 313. Together that's 601, which I believe is one too much, but I just don't know the code enough to make sure that's the problem.

Sylvain

I think this patch fix the issue, but maybe it's worth re-writing "SDL_UpperBlitScaled" using SDL_FRect.
2016-11-30 22:06:05 -08:00
..
atomic Updated copyright to 2016 2016-01-02 10:10:34 -08:00
audio directsound: fixed compiler warnings. 2016-11-23 10:51:44 -05:00
core Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment. 2016-11-29 05:34:20 -08:00
cpuinfo cpuinfo: fix SDL_HasNEON() on older iOS devices, fixed C++ comment. 2016-11-21 20:35:59 -05:00
dynapi Added an API to iterate over game controller mappings 2016-11-29 06:36:57 -08:00
events Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
file Updated copyright to 2016 2016-01-02 10:10:34 -08:00
filesystem Fixed compiling if filesystem is disabled (thanks, Elias!). 2016-08-30 21:14:13 +02:00
haptic Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
joystick Fixed the controller mappings for the OUYA controller 2016-11-30 12:58:03 -08:00
libm Fixed all known static analysis bugs, with checker-279 on macOS. 2016-11-24 21:41:09 -05:00
loadso Fixed bug 3478 - Patch Haiku to use dlopen instead of load_add_on 2016-11-01 10:30:46 -07:00
main Fixed bug 3461 - Implement TEXTINPUT events for Haiku 2016-10-19 20:42:22 -07:00
power Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
render Fixed all known static analysis bugs, with checker-279 on macOS. 2016-11-24 21:41:09 -05:00
stdlib Still more compiler warning fixes for various platforms. 2016-11-23 17:20:28 -05:00
test Still more compiler warning fixes for various platforms. 2016-11-23 17:20:28 -05:00
thread Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
timer Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00
video Fixed bug 3340 - SDL_BlitScaled causes access violation in some cases. 2016-11-30 22:06:05 -08:00
SDL_assert_c.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_assert.c Fixed bug 1646 - Warnings from clang with -Weverything 2016-11-15 01:30:08 -08:00
SDL_error_c.h Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
SDL_error.c Still more compiler warning fixes for various platforms. 2016-11-23 17:20:28 -05:00
SDL_hints.c Implemented SDL_GetHintBoolean() to make it easier to check boolean hints 2016-10-07 23:40:44 -07:00
SDL_internal.h Renaming of guard header names to quiet -Wreserved-id-macro 2016-11-20 21:34:54 -08:00
SDL_log.c Fixed warning building under mingw, patch contributed by Sylvain 2016-11-20 21:29:27 -08:00
SDL.c Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00