diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2008-04-09 13:37:59 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2008-04-09 15:34:16 +0200 |
commit | 032732270851ec2a12fc36e421f7335a2bd6ec34 (patch) | |
tree | a37a49124b9055cbb32ee7ffc7cfe34ddf9bbc93 | |
parent | 85b855f26f1578d52e9ed1dd0e3a9a1340ef1a2d (diff) |
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)
-rw-r--r-- | Xext/xres.c | 2 |
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++) { |