Thomas Faber : winhttp: Avoid buffer overrun in alloc_handle.
Alexandre Julliard
julliard at winehq.org
Sun Jul 3 12:18:26 CDT 2016
Module: wine
Branch: master
Commit: 834137517ae5497478273a1d87080557d1eedfec
URL: http://source.winehq.org/git/wine.git/?a=commit;h=834137517ae5497478273a1d87080557d1eedfec
Author: Thomas Faber <thomas.faber at 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 at reactos.org>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 );
More information about the wine-cvs
mailing list