diff --git a/SDL-1.2-SDL_BlitCopyOverlap_memcpy.patch b/SDL-1.2-SDL_BlitCopyOverlap_memcpy.patch new file mode 100644 index 0000000..50025fc --- /dev/null +++ b/SDL-1.2-SDL_BlitCopyOverlap_memcpy.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Sam Lantinga +# Date 1297938710 28800 +# Branch SDL-1.2 +# Node ID d898ee5431f52dd630e311b325eb5a42c8607a60 +# Parent 6bb01861c4c0d28dcea67e04ef723feaaf730d07 +Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order) + +The much more complete fix is in SDL 1.3, but this is a band-aid that will fix the bug for 1.2. + +diff -r 6bb01861c4c0 -r d898ee5431f5 src/video/SDL_blit.c +--- a/src/video/SDL_blit.c Wed Feb 16 04:49:07 2011 -0800 ++++ b/src/video/SDL_blit.c Thu Feb 17 02:31:50 2011 -0800 +@@ -214,7 +214,7 @@ + dstskip = w+info->d_skip; + if ( dst < src ) { + while ( h-- ) { +- SDL_memcpy(dst, src, w); ++ SDL_memmove(dst, src, w); + src += srcskip; + dst += dstskip; + } diff --git a/SDL.spec b/SDL.spec index d6e1fb2..1023ab1 100644 --- a/SDL.spec +++ b/SDL.spec @@ -1,7 +1,7 @@ Summary: A cross-platform multimedia library Name: SDL Version: 1.2.14 -Release: 9%{?dist} +Release: 10%{?dist} # Source: http://www.libsdl.org/release/%%{name}-%%{version}.tar.gz # To create the repackaged archive use ./repackage.sh %%{version} Source0: %{name}-%{version}_repackaged.tar.gz @@ -20,6 +20,8 @@ Patch4: SDL-1.2.14-xio_error-rh603984.patch Patch5: SDL-1.2.14-x11_grab_down_button.patch # Newer Linux has bigger structure for joystick, in upstream, sdl900, rh624241 Patch6: SDL-1.2.14-linux_2.6_joystick.patch +# Do not call memcpy() on overlapping areas, in upstream, sdl1090, rh669844 +Patch7: SDL-1.2-SDL_BlitCopyOverlap_memcpy.patch URL: http://www.libsdl.org/ License: LGPLv2+ @@ -80,6 +82,7 @@ static SDL applications. %patch4 -p1 -b .xio_error %patch5 -p1 -b .x11_grab_down_button %patch6 -p1 -b .linux_2.6_joystick +%patch7 -p1 -b ,SDL_BlitCopyOverlap_memcpy for F in CREDITS; do iconv -f iso8859-1 -t utf-8 < "$F" > "${F}.utf" touch --reference "$F" "${F}.utf" @@ -142,6 +145,9 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Fri Feb 18 2011 Petr Pisar - 1.2.14-10 +- Do not call memcpy() on overlapping areas (bug #669844) + * Mon Feb 07 2011 Fedora Release Engineering - 1.2.14-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild