libxi: Changes to 'upstream-unstable'
configure.ac | 2 +-
src/XIQueryDevice.c | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit b87c312590877800b4e18a17a012b47839f5c06b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Jan 23 13:44:58 2017 +1000
libXi 1.7.9
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 3b84c74..69c9ef4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXi], [1.7.8],
+AC_INIT([libXi], [1.7.9],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([src/config.h])
commit 557b60798a9da49386f1034b133838332735de22
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Tue Dec 27 17:24:10 2016 +0100
Fix possible free of uninitialized pointer
If the _XReply() call fails, we'll try to free an uninitialized
pointer.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849026
Reported-by: Thomas Walker <thwalker3@gmail.com>
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Tested-by: Thomas Walker <thwalker3@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index a877d78..51e2d0d 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -46,7 +46,7 @@ XIQueryDevice(Display *dpy, int deviceid, int *ndevices_return)
char *ptr;
char *end;
int i;
- char *buf;
+ char *buf = NULL;
XExtDisplayInfo *extinfo = XInput_find_display(dpy);
commit 4c5c8d6246debc06a56120cff71bfdf1877884d0
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Tue Oct 25 21:31:19 2016 +0200
Check that allocating a buffer succeeded
Since we are going to write into the buffer, we should make sure the
allocation didn't fail.
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index e3b0c9f..a877d78 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -66,17 +66,18 @@ XIQueryDevice(Display *dpy, int deviceid, int *ndevices_return)
{
*ndevices_return = reply.num_devices;
info = Xmalloc((reply.num_devices + 1) * sizeof(XIDeviceInfo));
+ buf = Xmalloc(reply.length * 4);
}
else
{
*ndevices_return = 0;
info = NULL;
+ buf = NULL;
}
- if (!info)
+ if (!info || !buf)
goto error;
- buf = Xmalloc(reply.length * 4);
_XRead(dpy, buf, reply.length * 4);
ptr = buf;
end = buf + reply.length * 4;
@@ -135,9 +136,9 @@ error_loop:
Xfree(info[i].name);
Xfree(info[i].classes);
}
+error:
Xfree(info);
Xfree(buf);
-error:
UnlockDisplay(dpy);
error_unlocked:
SyncHandle();
commit 7ac03c6c1907a39b5b42b17ad331295b8c85154d
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Tue Oct 25 21:31:18 2016 +0200
Plug a memory leak
Introduced in commit 19a9cd6.
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c
index a457cd6..e3b0c9f 100644
--- a/src/XIQueryDevice.c
+++ b/src/XIQueryDevice.c
@@ -135,6 +135,8 @@ error_loop:
Xfree(info[i].name);
Xfree(info[i].classes);
}
+ Xfree(info);
+ Xfree(buf);
error:
UnlockDisplay(dpy);
error_unlocked:
Reply to: