[PATCH] Xext/xres.c: Possible buffer underrun
Colin Harrison
colin.harrison at virgin.net
Mon Jul 23 05:05:56 PDT 2012
Hi,
I got a crash at free(counts) in ProcXResQueryClientResources() in
Xext/xres.c when using client xrestop.
Traced to an out-by-one error in ResFindAllRes() (please check code and
confirm?).
Fixed, for me (MinGW compilation for Windows), with the patch...
--- ./Xext/save_xres.c 2012-07-10 11:16:44.191904782 +0100
+++ ./Xext/xres.c 2012-07-16 16:19:50.078292944 +0100
@@ -274,7 +274,7 @@
{
int *counts = (int *) cdata;
- counts[(type & TypeMask) - 1]++;
+ counts[(type & TypeMask)]++;
}
static int
Thanks,
Colin Harrison
More information about the xorg-devel
mailing list