PATCH: 2118, 2119

Marcus Meissner marcus at jet.franken.de
Mon Mar 22 01:11:35 CST 2004


Hi,

Ciao, Marcus

Changelog:
	Allocate correct number of pointers for szAcceptTypes.	#2119
	HeapReAlloc might modify the pointer, so store it there.#2118
	

Index: dlls/wininet/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/http.c,v
retrieving revision 1.50
diff -u -r1.50 http.c
--- dlls/wininet/http.c	16 Mar 2004 01:06:30 -0000	1.50
+++ dlls/wininet/http.c	22 Mar 2004 07:10:10 -0000
@@ -338,7 +338,7 @@
     if (lpszAcceptTypes)
     {
         while (lpszAcceptTypes[acceptTypesCount]) { acceptTypesCount++; } /* find out how many there are */
-        szAcceptTypes = HeapAlloc(GetProcessHeap(), 0, sizeof(CHAR *) * acceptTypesCount);
+        szAcceptTypes = HeapAlloc(GetProcessHeap(), 0, sizeof(CHAR*)*(acceptTypesCount+1));
         acceptTypesCount = 0;
         while (lpszAcceptTypes[acceptTypesCount])
         {
@@ -2164,6 +2164,7 @@
             lpsztmp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,  lphttpHdr->lpszValue, len+1);
             if (lpsztmp)
             {
+		lphttpHdr->lpszValue = lpsztmp;
 		/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */
                 if (ch > 0)
                 {
-- 



More information about the wine-patches mailing list