Thomas Faber : wininet: Avoid buffer overrun in alloc_object.

Alexandre Julliard julliard at winehq.org
Fri Jun 3 10:03:44 CDT 2016


Module: wine
Branch: master
Commit: 877a628aa620d034cf0195e43ac0f3c19f1beac2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=877a628aa620d034cf0195e43ac0f3c19f1beac2

Author: Thomas Faber <thomas.faber at reactos.org>
Date:   Thu Jun  2 14:36:53 2016 +0200

wininet: Avoid buffer overrun in alloc_object.

Signed-off-by: Thomas Faber <thomas.faber at reactos.org>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wininet/internet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 5c41664..d3d6a38 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -152,7 +152,7 @@ void *alloc_object(object_header_t *parent, const object_vtbl_t *vtbl, size_t si
         handle_table[handle] = ret;
         ret->valid_handle = TRUE;
 
-        while(handle_table[next_handle] && next_handle < handle_table_size)
+        while(next_handle < handle_table_size && handle_table[next_handle])
             next_handle++;
     }
 




More information about the wine-cvs mailing list