winhttp: Avoid buffer overrun in alloc_handle.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Thomas Faber 2016-06-26 01:45:36 +02:00 committed by Alexandre Julliard
parent af6f8ca413
commit 834137517a
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ HINTERNET alloc_handle( object_header_t *hdr )
if (handles[handle]) ERR("handle isn't free but should be\n");
handles[handle] = addref_object( hdr );
while (handles[next_handle] && (next_handle < max_handles)) next_handle++;
while ((next_handle < max_handles) && handles[next_handle]) next_handle++;
end:
LeaveCriticalSection( &handle_cs );