Commit 92ba2885 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

Avoid heap corruption by not accessing old HeapReAlloc'ed pointer.

parent 4519b1bd
...@@ -2439,6 +2439,7 @@ BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR value, D ...@@ -2439,6 +2439,7 @@ BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR value, D
lpsztmp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR)); lpsztmp = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lphttpHdr->lpszValue, (len+1)*sizeof(WCHAR));
if (lpsztmp) if (lpsztmp)
{ {
lphttpHdr->lpszValue = lpsztmp;
/* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */ /* FIXME: Increment lphttpHdr->wCount. Perhaps lpszValue should be an array */
if (ch > 0) if (ch > 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment