From c4c576d21bac311c077e7b4ce6b0ed527e727687b127b72e423db559c995b446 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 7 Nov 2017 11:08:46 +0000 Subject: [PATCH] Accepting request 537357 from home:etamPL:branches:games - update to 2.0.7 * Added audio stream conversion functions. * Added functions to query and set the SDL memory allocation functions. * Added locking functions for multi-threaded access to the joystick and game controller APIs. * Some functions are now thread-safe. - removed patches, merged upstream * dbus.diff * SDL2-ppc64-declaration-after-statement.patch * SDL-bnc1062784-check-overflow-xcf-props.patch OBS-URL: https://build.opensuse.org/request/show/537357 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=69 --- SDL-bnc1062784-check-overflow-xcf-props.patch | 49 ---------------- SDL2-2.0.6.tar.gz | 3 - SDL2-2.0.6.tar.gz.sig | Bin 95 -> 0 bytes SDL2-2.0.7.tar.gz | 3 + SDL2-2.0.7.tar.gz.sig | Bin 0 -> 95 bytes SDL2-ppc64-declaration-after-statement.patch | 54 ------------------ SDL2.changes | 15 +++++ SDL2.spec | 9 +-- dbus.diff | 21 ------- 9 files changed, 19 insertions(+), 135 deletions(-) delete mode 100644 SDL-bnc1062784-check-overflow-xcf-props.patch delete mode 100644 SDL2-2.0.6.tar.gz delete mode 100644 SDL2-2.0.6.tar.gz.sig create mode 100644 SDL2-2.0.7.tar.gz create mode 100644 SDL2-2.0.7.tar.gz.sig delete mode 100644 SDL2-ppc64-declaration-after-statement.patch delete mode 100644 dbus.diff diff --git a/SDL-bnc1062784-check-overflow-xcf-props.patch b/SDL-bnc1062784-check-overflow-xcf-props.patch deleted file mode 100644 index fe84615..0000000 --- a/SDL-bnc1062784-check-overflow-xcf-props.patch +++ /dev/null @@ -1,49 +0,0 @@ -# From: sreeves@suse.com -# CVE-2017-2888. Check for overflow when computing size. -# Based on upstream patch: 81a4950907a01359f2f9390875291eb3951e6c6b - -Index: SDL2-2.0.6/include/SDL_stdinc.h -=================================================================== ---- SDL2-2.0.6.orig/include/SDL_stdinc.h -+++ SDL2-2.0.6/include/SDL_stdinc.h -@@ -162,6 +162,7 @@ typedef uint16_t Uint16; - /** - * \brief A signed 32-bit integer type. - */ -+#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ - typedef int32_t Sint32; - /** - * \brief An unsigned 32-bit integer type. -Index: SDL2-2.0.6/src/video/SDL_surface.c -=================================================================== ---- SDL2-2.0.6.orig/src/video/SDL_surface.c -+++ SDL2-2.0.6/src/video/SDL_surface.c -@@ -26,6 +26,10 @@ - #include "SDL_RLEaccel_c.h" - #include "SDL_pixels_c.h" - -+/* Check to make sure we can safely check multiplication of surface w and pitch and it won't overflow size_t */ -+SDL_COMPILE_TIME_ASSERT(surface_size_assumptions, -+ sizeof(int) == sizeof(Sint32) && sizeof(size_t) >= sizeof(Sint32)); -+ - /* Public routines */ - - /* -@@ -80,7 +84,16 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 fl - - /* Get the pixels */ - if (surface->w && surface->h) { -- surface->pixels = SDL_malloc(surface->h * surface->pitch); -+ /* Assumptions checked in surface_size_assumptions assert above */ -+ Sint64 size = ((Sint64)surface->h * surface->pitch); -+ if (size < 0 || size > SDL_MAX_SINT32) { -+ /* Overflow... */ -+ SDL_FreeSurface(surface); -+ SDL_OutOfMemory(); -+ return NULL; -+ } -+ -+ surface->pixels = SDL_malloc((size_t)size); - if (!surface->pixels) { - SDL_FreeSurface(surface); - SDL_OutOfMemory(); diff --git a/SDL2-2.0.6.tar.gz b/SDL2-2.0.6.tar.gz deleted file mode 100644 index 89b4fe7..0000000 --- a/SDL2-2.0.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03658b5660d16d7b31263a691e058ed37acdab155d68dabbad79998fb552c5df -size 4420311 diff --git a/SDL2-2.0.6.tar.gz.sig b/SDL2-2.0.6.tar.gz.sig deleted file mode 100644 index 0eebe1701ea3554afb62082225c481019e58d0525ce75958c24ffad30299c2b6..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WD(U!j%^5DT3>$gL7TzS$>qz-te>$mMIMdmXW-%#fQj^(G0YE{ vwNoK}YOs2k=D%|1snZzu2rrOiSg^O!=$$4ncjxY$_Var7FWV$gL7TzS$>qz-te>$mMZR-h%fQ7c028V4W?0Z{ v>3Bt+<>&vjjSC<0^z`i6_kL0s!#sVi&0qG%v}e33;TMotz3so> 3)) -- Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift); -- Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift); -- Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift); -- Uint32 amask; -+ rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift); -+ gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift); -+ bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift); -+ - /* Use zero for alpha if either surface doesn't have alpha */ - if (dstfmt->Amask) { - amask = -@@ -147,6 +150,7 @@ calc_swizzle32(const SDL_PixelFormat * s - 0xFFFFFFFF); - } - #undef RESHIFT -+ - ((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask); - vswiz = vec_add(plus, (vector unsigned char) vec_splat(srcvec, 0)); - return (vswiz); diff --git a/SDL2.changes b/SDL2.changes index 7455873..e9ca13a 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sat Oct 28 21:01:17 UTC 2017 - adam@mizerski.pl + +- update to 2.0.7 + * Added audio stream conversion functions. + * Added functions to query and set the SDL memory allocation + functions. + * Added locking functions for multi-threaded access to + the joystick and game controller APIs. + * Some functions are now thread-safe. +- removed patches, merged upstream + * dbus.diff + * SDL2-ppc64-declaration-after-statement.patch + * SDL-bnc1062784-check-overflow-xcf-props.patch + ------------------------------------------------------------------- Thu Oct 19 04:00:09 UTC 2017 - sreeves@suse.com diff --git a/SDL2.spec b/SDL2.spec index a8e285d..72f6470 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -18,7 +18,7 @@ Name: SDL2 %define lname libSDL2-2_0-0 -Version: 2.0.6 +Version: 2.0.7 Release: 0 Summary: Simple DirectMedia Layer Library License: Zlib @@ -30,9 +30,6 @@ Source: http://libsdl.org/release/%name-%version.tar.gz Source2: http://libsdl.org/release/%name-%version.tar.gz.sig Source3: %name.keyring Source4: baselibs.conf -Patch1: dbus.diff -Patch2: %name-ppc64-declaration-after-statement.patch -Patch3: SDL-bnc1062784-check-overflow-xcf-props.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: dos2unix @@ -106,10 +103,6 @@ library. %prep %setup -q -%patch -P 1 -P 3 -p1 -%ifarch ppc64 ppc64le -%patch -P 2 -p1 -%endif dos2unix WhatsNew.txt dos2unix TODO.txt dos2unix BUGS.txt diff --git a/dbus.diff b/dbus.diff deleted file mode 100644 index dd30509..0000000 --- a/dbus.diff +++ /dev/null @@ -1,21 +0,0 @@ -References: https://bugzilla.libsdl.org/show_bug.cgi?id=3854 - -Fix an assertion, triggered by libdbus receiving garbage -from a varargs function in SDL. ---- - src/core/linux/SDL_ibus.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: SDL2-2.0.6/src/core/linux/SDL_ibus.c -=================================================================== ---- SDL2-2.0.6.orig/src/core/linux/SDL_ibus.c -+++ SDL2-2.0.6/src/core/linux/SDL_ibus.c -@@ -479,7 +479,7 @@ IBus_SimpleMessage(const char *method) - SDL_DBusContext *dbus = SDL_DBus_GetContext(); - - if (IBus_CheckConnection(dbus)) { -- SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, method); -+ SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, method, DBUS_TYPE_INVALID); - } - } -