Module: wine Branch: master Commit: 834137517ae5497478273a1d87080557d1eedfec URL: http://source.winehq.org/git/wine.git/?a=commit;h=834137517ae5497478273a1d87...
Author: Thomas Faber thomas.faber@reactos.org Date: Sun Jun 26 01:45:36 2016 +0200
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
---
dlls/winhttp/handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winhttp/handle.c b/dlls/winhttp/handle.c index 7a346a8..aa980ed 100644 --- a/dlls/winhttp/handle.c +++ b/dlls/winhttp/handle.c @@ -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 );