Commit 15a7d3b2 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

wininet: Copy from the start of the cookie name, not the cookie data.

Copy from the start of the cookie name, not the cookie data when parsing cookies with a NULL cookie name.
parent 3efe4253
...@@ -426,7 +426,7 @@ BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, ...@@ -426,7 +426,7 @@ BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
ourCookieData += 1; ourCookieData += 1;
ourCookieName = HeapAlloc(GetProcessHeap(), 0, ourCookieName = HeapAlloc(GetProcessHeap(), 0,
(ourCookieNameSize + 1)*sizeof(WCHAR)); (ourCookieNameSize + 1)*sizeof(WCHAR));
memcpy(ourCookieName, ourCookieData, ourCookieNameSize * sizeof(WCHAR)); memcpy(ourCookieName, lpCookieData, ourCookieNameSize * sizeof(WCHAR));
ourCookieName[ourCookieNameSize] = '\0'; ourCookieName[ourCookieNameSize] = '\0';
TRACE("setting (hacked) cookie of %s, %s\n", TRACE("setting (hacked) cookie of %s, %s\n",
debugstr_w(ourCookieName), debugstr_w(ourCookieData)); debugstr_w(ourCookieName), debugstr_w(ourCookieData));
......
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