From 032732270851ec2a12fc36e421f7335a2bd6ec34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 9 Apr 2008 13:37:59 +0200 Subject: [PATCH] Fix off-by-one error in ProcXResQueryClients(). Fixes memory corruption reported at http://bugs.freedesktop.org/show_bug.cgi?id=14004 . (cherry picked from commit 0d1746995d91b55e40f233f0c38b56bafe896d38) --- Xext/xres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xres.c b/Xext/xres.c index 9bd70c672..f444c4e69 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -64,7 +64,7 @@ ProcXResQueryClients (ClientPtr client) REQUEST_SIZE_MATCH(xXResQueryClientsReq); - current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); + current_clients = xalloc(currentMaxClients * sizeof(int)); num_clients = 0; for(i = 0; i < currentMaxClients; i++) {