Assuming nitems is less than we expect, its possible for get_mapped_area to return before writing values to its in-parameters. This adds an additional verification to the returned data type.
Signed-off-by: Jason Gerecke <killert...@gmail.com> --- tools/xsetwacom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index 3148355..fdecfb9 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -2119,7 +2119,7 @@ Bool get_mapped_area(Display *dpy, XDevice *dev, int *width, int *height, int *x AnyPropertyType, &type, &format, &nitems, &bytes_after, (unsigned char**)&data); - if (format != 32 || type != XInternAtom(dpy, "FLOAT", True)) + if (format != 32 || type != XInternAtom(dpy, "FLOAT", True) || nitems != 9) { fprintf(stderr,"Property for '%s' has unexpected type - this is a bug.\n", "Coordinate Transformation Matrix"); -- 2.1.0 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel