Fix off-by-one error in ProcXResQueryClients().

Fixes memory corruption reported at
http://bugs.freedesktop.org/show_bug.cgi?id=14004 .
This commit is contained in:
Michel Dänzer 2008-04-09 13:37:59 +02:00
parent 6d031cbdef
commit 0d1746995d

View File

@ -64,7 +64,7 @@ ProcXResQueryClients (ClientPtr client)
REQUEST_SIZE_MATCH(xXResQueryClientsReq); REQUEST_SIZE_MATCH(xXResQueryClientsReq);
current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); current_clients = xalloc(currentMaxClients * sizeof(int));
num_clients = 0; num_clients = 0;
for(i = 0; i < currentMaxClients; i++) { for(i = 0; i < currentMaxClients; i++) {