summaryrefslogtreecommitdiff
path: root/Xext/xres.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-04-09 13:37:59 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2008-04-09 13:49:05 +0200
commit0d1746995d91b55e40f233f0c38b56bafe896d38 (patch)
tree08408dd86221ae9b3beb27608ac470de061da12d /Xext/xres.c
parent6d031cbdefd8072b61645955f01b470a3e6858c1 (diff)
Fix off-by-one error in ProcXResQueryClients().
Fixes memory corruption reported at http://bugs.freedesktop.org/show_bug.cgi?id=14004 .
Diffstat (limited to 'Xext/xres.c')
-rw-r--r--Xext/xres.c2
1 files changed, 1 insertions, 1 deletions
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++) {