ntdll: Avoid potential infinite loop.

This commit is contained in:
Paul Bryan Roberts 2009-02-12 08:09:17 +00:00 committed by Alexandre Julliard
parent 9a4e519aeb
commit a552587de1
1 changed files with 3 additions and 1 deletions

View File

@ -293,13 +293,15 @@ NTSTATUS WINAPI NtQueryInformationToken(
char stack_buffer[256]; char stack_buffer[256];
unsigned int server_buf_len = sizeof(stack_buffer); unsigned int server_buf_len = sizeof(stack_buffer);
void *buffer = stack_buffer; void *buffer = stack_buffer;
BOOLEAN need_more_memory = FALSE; BOOLEAN need_more_memory;
/* we cannot work out the size of the server buffer required for the /* we cannot work out the size of the server buffer required for the
* input size, since there are two factors affecting how much can be * input size, since there are two factors affecting how much can be
* stored in the buffer - number of groups and lengths of sids */ * stored in the buffer - number of groups and lengths of sids */
do do
{ {
need_more_memory = FALSE;
SERVER_START_REQ( get_token_groups ) SERVER_START_REQ( get_token_groups )
{ {
TOKEN_GROUPS *groups = tokeninfo; TOKEN_GROUPS *groups = tokeninfo;