Fix 0001-Handle-unknown-device-classes.patch: missing prototype change for

copy_classes in XIQueryDevice caused parameter corruption (#744960)
This commit is contained in:
Peter Hutterer 2011-10-11 10:51:40 +10:00
parent e9e6be20f0
commit f445c75e82
2 changed files with 19 additions and 6 deletions

View File

@ -1,4 +1,4 @@
From 4fe9df2e06c2f0d258f9dbc34127b8f75930f985 Mon Sep 17 00:00:00 2001
From 635c2c029b1e73311c3f650bcaf7eeb9e782134b Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 17 Aug 2011 15:20:48 +1000
Subject: [PATCH] Handle unknown device classes.
@ -14,8 +14,8 @@ handlers so to automatically skip any unknown classes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/XExtInt.c | 30 +++++++++++++++++++++---------
src/XIQueryDevice.c | 2 +-
2 files changed, 22 insertions(+), 10 deletions(-)
src/XIQueryDevice.c | 4 ++--
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 86a780e..9e1ad19 100644
@ -150,9 +150,18 @@ index 86a780e..9e1ad19 100644
return 1;
}
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index 4e2f392..c8197d2 100644
index 4e2f392..c22aee1 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -29,7 +29,7 @@
#include <X11/extensions/extutil.h>
#include "XIint.h"
-extern int copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int nclasses);
+extern int copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses);
extern int size_classes(xXIAnyInfo* from, int nclasses);
XIDeviceInfo*
@@ -87,7 +87,7 @@ XIQueryDevice(Display *dpy, int deviceid, int *ndevices_return)
ptr += ((wire->name_len + 3)/4) * 4;
@ -163,5 +172,5 @@ index 4e2f392..c8197d2 100644
Xfree(buf);
--
1.7.6
1.7.6.4

View File

@ -4,7 +4,7 @@
Summary: X.Org X11 libXi runtime library
Name: libXi
Version: 1.4.3
Release: 2%{?dist}
Release: 3%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.x.org
@ -87,6 +87,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3*
%changelog
* Tue Oct 11 2011 Peter Hutterer <peter.hutterer@redhat.com> 1.4.3-3
- Fix 0001-Handle-unknown-device-classes.patch: missing prototype change for
copy_classes in XIQueryDevice caused parameter corruption (#744960)
* Wed Aug 17 2011 Peter Hutterer <peter.hutterer@redhat.com> 1.4.3-2
- 0001-Handle-unknown-device-classes.patch: don't corrupt memory when a
server sends unknown device classes.