Fix stack smash on pointer init (#1195905)

This commit is contained in:
Peter Hutterer 2015-02-25 08:32:10 +10:00
parent e466f5f130
commit 536eb3fe74
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 2600a4a352185f7d4d828f7d223628e4bb0f2aa3 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
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 <http://bugs.freedesktop.org/show_bug.cgi?id=89300>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
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

View File

@ -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 <peter.hutterer@redhat.com> 0.7.0-2
- Fix stack smash on pointer init (#1195905)
* Tue Feb 24 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.7.0-1
- xorg-x11-drv-libinput 0.7.0