[PATCH libxi] Fix possible free of uninitialized pointer
Emilio Pozuelo Monfort
pochu at debian.org
Tue Dec 27 16:24:10 UTC 2016
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 at gmail.com>
Signed-off-by: Emilio Pozuelo Monfort <pochu at debian.org>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Tested-by: Thomas Walker <thwalker3 at gmail.com>
---
src/XIQueryDevice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.11.0
More information about the xorg-devel
mailing list