Rob Shearman : wininet: Make WININET_AllocHandle 64-bit safe by using the correct type in the sizeof expression .

Alexandre Julliard julliard at winehq.org
Wed Oct 1 14:09:44 CDT 2008


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

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Wed Oct  1 11:20:03 2008 +0100

wininet: Make WININET_AllocHandle 64-bit safe by using the correct type in the sizeof expression.

---

 dlls/wininet/internet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index d06298f..6166ff8 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -113,7 +113,7 @@ HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info )
     {
         num = HANDLE_CHUNK_SIZE;
         p = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 
-                   sizeof (UINT)* num);
+                   sizeof (*WININET_Handles)* num);
         if( !p )
             goto end;
         WININET_Handles = p;
@@ -123,7 +123,7 @@ HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info )
     {
         num = WININET_dwMaxHandles + HANDLE_CHUNK_SIZE;
         p = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
-                   WININET_Handles, sizeof (UINT)* num);
+                   WININET_Handles, sizeof (*WININET_Handles)* num);
         if( !p )
             goto end;
         WININET_Handles = p;




More information about the wine-cvs mailing list