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 0d1746995d)
This commit is contained in:
Michel Dänzer 2008-04-09 13:37:59 +02:00
parent 85b855f26f
commit 0327322708

View File

@ -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++) {