From 536eb3fe74e2bab842a2d8ad6ba9a7768ca0bc89 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 25 Feb 2015 08:32:10 +1000 Subject: [PATCH] Fix stack smash on pointer init (#1195905) --- ...rror-in-buttonmap-initialization-893.patch | 29 +++++++++++++++++++ xorg-x11-drv-libinput.spec | 8 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-off-by-one-error-in-buttonmap-initialization-893.patch diff --git a/0001-Fix-off-by-one-error-in-buttonmap-initialization-893.patch b/0001-Fix-off-by-one-error-in-buttonmap-initialization-893.patch new file mode 100644 index 0000000..cb1b0eb --- /dev/null +++ b/0001-Fix-off-by-one-error-in-buttonmap-initialization-893.patch @@ -0,0 +1,29 @@ +From 2600a4a352185f7d4d828f7d223628e4bb0f2aa3 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 25 Feb 2015 07:48:18 +1000 +Subject: [PATCH xf86-input-libinput] Fix off-by-one error in buttonmap + initialization (#89300) + +X.Org Bug 89300 + +Signed-off-by: Peter Hutterer +--- + src/libinput.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libinput.c b/src/libinput.c +index 9613fbd..eee3bfb 100644 +--- a/src/libinput.c ++++ b/src/libinput.c +@@ -372,7 +372,7 @@ init_button_map(unsigned char *btnmap, size_t size) + int i; + + memset(btnmap, 0, size); +- for (i = 0; i <= size; i++) ++ for (i = 0; i < size; i++) + btnmap[i] = i; + } + +-- +2.1.0 + diff --git a/xorg-x11-drv-libinput.spec b/xorg-x11-drv-libinput.spec index aa2ad41..3ee2d7e 100644 --- a/xorg-x11-drv-libinput.spec +++ b/xorg-x11-drv-libinput.spec @@ -5,13 +5,15 @@ Summary: Xorg X11 libinput input driver Name: xorg-x11-drv-libinput Version: 0.7.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://ww.x.org License: MIT Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2 Source1: 90-libinput.conf +Patch01: 0001-Fix-off-by-one-error-in-buttonmap-initialization-893.patch + ExcludeArch: s390 s390x BuildRequires: autoconf automake libtool @@ -30,6 +32,7 @@ supporting all devices. %prep %setup -q -n %{tarball}-%{version} +%patch01 -p1 %build autoreconf --force -v --install || exit 1 @@ -65,6 +68,9 @@ Xorg X11 libinput input driver development files. %{_includedir}/xorg/libinput-properties.h %changelog +* Wed Feb 25 2015 Peter Hutterer 0.7.0-2 +- Fix stack smash on pointer init (#1195905) + * Tue Feb 24 2015 Peter Hutterer 0.7.0-1 - xorg-x11-drv-libinput 0.7.0