[SDL/f18] Ignore joystick axis events if they aren't in a sane range
Petr Pisar
ppisar at fedoraproject.org
Thu Dec 5 13:30:23 UTC 2013
commit 0d99be2fc5d4ff1922739cc13e22875e1b0f0f65
Author: Petr Písař <ppisar at redhat.com>
Date: Thu Dec 5 14:12:43 2013 +0100
Ignore joystick axis events if they aren't in a sane range
SDL-1.2.15-ignore_insane_joystick_axis.patch | 20 ++++++++++++++++++++
SDL.spec | 8 +++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/SDL-1.2.15-ignore_insane_joystick_axis.patch b/SDL-1.2.15-ignore_insane_joystick_axis.patch
new file mode 100644
index 0000000..33340fd
--- /dev/null
+++ b/SDL-1.2.15-ignore_insane_joystick_axis.patch
@@ -0,0 +1,20 @@
+changeset: 6324:95abff7adcc2
+branch: SDL-1.2
+parent: 6306:2b923729fd01
+user: Ryan C. Gordon <icculus at icculus.org>
+date: Sun Jun 03 04:49:25 2012 -0400
+summary: Linux evdev: ignore joystick axis events if they aren't in a sane range.
+
+diff -r 2b923729fd01 -r 95abff7adcc2 src/joystick/linux/SDL_sysjoystick.c
+--- a/src/joystick/linux/SDL_sysjoystick.c Sat May 12 23:32:51 2012 -0700
++++ b/src/joystick/linux/SDL_sysjoystick.c Sun Jun 03 04:49:25 2012 -0400
+@@ -1106,6 +1106,9 @@
+ }
+ break;
+ case EV_ABS:
++ if (code > ABS_MISC) {
++ break;
++ }
+ switch (code) {
+ case ABS_HAT0X:
+ case ABS_HAT0Y:
diff --git a/SDL.spec b/SDL.spec
index 3755902..bb9af1f 100644
--- a/SDL.spec
+++ b/SDL.spec
@@ -1,6 +1,6 @@
Name: SDL
Version: 1.2.15
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A cross-platform multimedia library
Group: System Environment/Libraries
URL: http://www.libsdl.org/
@@ -18,6 +18,8 @@ Patch0: SDL-1.2.12-multilib.patch
Patch1: SDL-1.2.10-GrabNotViewable.patch
# Proposed to upstream as sdl1680, rh891973
Patch2: SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch
+# Upstream fix for sdl1486, rh990677
+Patch3: SDL-1.2.15-ignore_insane_joystick_axis.patch
BuildRequires: alsa-lib-devel
BuildRequires: arts-devel
@@ -76,6 +78,7 @@ applications.
%patch0 -p1 -b .multilib
%patch1 -p0 -b .grabnotviewable
%patch2 -p1 -b .gamma
+%patch3 -p1 -b .insane_axis
for F in CREDITS; do
iconv -f iso8859-1 -t utf-8 < "$F" > "${F}.utf"
touch --reference "$F" "${F}.utf"
@@ -131,6 +134,9 @@ rm -f %{buildroot}%{_libdir}/*.la
%{_libdir}/lib*.a
%changelog
+* Thu Dec 05 2013 Petr Pisar <ppisar at redhat.com> - 1.2.15-4
+- Ignore joystick axis events if they aren't in a sane range (bug #990677)
+
* Wed Jan 23 2013 Petr Pisar <ppisar at redhat.com> - 1.2.15-3
- Work around bug in Xorg to allow changing gamma on X11 (bug #891973)
More information about the scm-commits
mailing list