Author: tfaber
Date: Sun Jul 20 08:30:21 2014
New Revision: 63724
URL:
http://svn.reactos.org/svn/reactos?rev=63724&view=rev
Log:
[WININET]
- Apply Wine commit 8fd44a3d (wininet: Fix invalid memory access in HTTP_QUERY_RAW_HEADERS
(Valgrind).) by Sebastian Lackner. Fixes crash in wininet:http InternetReadFile_test
Modified:
trunk/reactos/dll/win32/wininet/http.c
Modified: trunk/reactos/dll/win32/wininet/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Sun Jul 20 08:30:21 2014
@@ -3568,12 +3568,12 @@
TRACE("returning data: %s\n", debugstr_wn(headers, len /
sizeof(WCHAR)));
- for (i=0; i<len; i++)
+ for (i = 0; i < len / sizeof(WCHAR); i++)
{
if (headers[i] == '\n')
headers[i] = 0;
}
- memcpy(lpBuffer, headers, len + sizeof(WCHAR));
+ memcpy(lpBuffer, headers, len);
}
*lpdwBufferLength = len - sizeof(WCHAR);