ntdll: avoid potential infinite loop

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Thu Feb 12 02:09:17 CST 2009


---
 dlls/ntdll/nt.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 879a324..dc81648 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -293,17 +293,20 @@ NTSTATUS WINAPI NtQueryInformationToken(
         char stack_buffer[256];
         unsigned int server_buf_len = sizeof(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
          * input size, since there are two factors affecting how much can be
          * stored in the buffer - number of groups and lengths of sids */
         do
         {
+            need_more_memory = FALSE;
+
             SERVER_START_REQ( get_token_groups )
             {
                 TOKEN_GROUPS *groups = tokeninfo;
 
+
                 req->handle = wine_server_obj_handle( token );
                 wine_server_set_reply( req, buffer, server_buf_len );
                 status = wine_server_call( req );
-- 
1.5.4.3


--------------010706050601080402010100--



More information about the wine-devel mailing list