PATCH: 2118, 2119
Marcus Meissner
marcus at jet.franken.de
Mon Mar 22 01:23:42 CST 2004
On Mon, Mar 22, 2004 at 08:11:35AM +0100, Marcus Meissner wrote:
> Hi,
>
> Ciao, Marcus
>
Changelog:
Allocate correct number of pointers for szAcceptTypes, since we
need it NULL terminated.
HeapReAlloc will modify the pointer, so store it there.
Make that:
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:22:44 -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])
{
@@ -351,6 +351,7 @@
-1, szAcceptTypes[acceptTypesCount], len, NULL, NULL);
acceptTypesCount++;
}
+ szAcceptTypes[acceptTypesCount] = NULL;
}
else szAcceptTypes = 0;
@@ -2164,6 +2165,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