[SDL] Enlarge joystick hat structure

Petr Pisar ppisar at fedoraproject.org
Tue Aug 17 09:23:42 UTC 2010


commit 88b54fede89f1b65dbc89e3d1b42b503429d9c26
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Aug 17 11:19:32 2010 +0200

    Enlarge joystick hat structure
    
    Kernel joystick structure has grown in unknown 2.6 Linux version leading to
    out of array access in user space (rh624241, sdl900).

 SDL-1.2.14-linux_2.6_joystick.patch |   19 +++++++++++++++++++
 SDL.spec                            |    9 ++++++++-
 2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/SDL-1.2.14-linux_2.6_joystick.patch b/SDL-1.2.14-linux_2.6_joystick.patch
new file mode 100644
index 0000000..83afea2
--- /dev/null
+++ b/SDL-1.2.14-linux_2.6_joystick.patch
@@ -0,0 +1,19 @@
+changeset:   4394:42012a6afb5b
+branch:      SDL-1.2
+user:        Sam Lantinga <slouken at libsdl.org>
+date:        Thu Dec 17 14:33:00 2009 +0000
+summary:     Merged SDL 1.3 revision 5424, fixing a crash in the joystick code on recent kernels.
+
+diff -r 9afe12fb4c41 -r 42012a6afb5b src/joystick/linux/SDL_sysjoystick.c
+--- a/src/joystick/linux/SDL_sysjoystick.c	Mon Dec 14 22:41:31 2009 +0000
++++ b/src/joystick/linux/SDL_sysjoystick.c	Thu Dec 17 14:33:00 2009 +0000
+@@ -700,7 +700,7 @@
+ 				continue;
+ 			}
+ 			if ( test_bit(i, absbit) ) {
+-				int values[5];
++				int values[6];
+ 
+ 				if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
+ 					continue;
+
diff --git a/SDL.spec b/SDL.spec
index b47f8ee..7b8a0dd 100644
--- a/SDL.spec
+++ b/SDL.spec
@@ -1,7 +1,7 @@
 Summary: A cross-platform multimedia library
 Name: SDL
 Version: 1.2.14
-Release: 7%{?dist}
+Release: 8%{?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
@@ -18,6 +18,8 @@ Patch3: SDL-1.2.14-audiodriver.patch
 Patch4: SDL-1.2.14-xio_error-rh603984.patch
 # From upstream <http://bugzilla.libsdl.org/show_bug.cgi?id=894>, rh556608
 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
 
 URL: http://www.libsdl.org/
 License: LGPLv2+
@@ -77,6 +79,7 @@ static SDL applications.
 %patch3 -p1 -b .audiodriver
 %patch4 -p1 -b .xio_error
 %patch5 -p1 -b .x11_grab_down_button
+%patch6 -p1 -b .linux_2.6_joystick
 for F in CREDITS; do 
     iconv -f iso8859-1 -t utf-8 < "$F" > "${F}.utf"
     touch --reference "$F" "${F}.utf"
@@ -139,6 +142,10 @@ rm -rf %{buildroot}
 %{_libdir}/lib*.a
 
 %changelog
+* Mon Aug 16 2010 Petr Pisar <ppisar at redhat.com> - 1.2.14-8
+- Kernel joystick structure has grown in unknown 2.6 Linux version (rh624241,
+  sdl900)
+
 * Thu Aug 12 2010 Petr Pisar <ppisar at redhat.com> - 1.2.14-7
 - Fix left button press event in windowed mode (rh556608, sdl894)
 - Remove unrecognized --disable-debug and --enable-dlopen configure options


More information about the scm-commits mailing list