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.
This commit is contained in:
Robert Shearman 2006-03-18 16:11:35 +00:00 committed by Alexandre Julliard
parent 3efe42537a
commit 15a7d3b2b4
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
ourCookieData += 1;
ourCookieName = HeapAlloc(GetProcessHeap(), 0,
(ourCookieNameSize + 1)*sizeof(WCHAR));
memcpy(ourCookieName, ourCookieData, ourCookieNameSize * sizeof(WCHAR));
memcpy(ourCookieName, lpCookieData, ourCookieNameSize * sizeof(WCHAR));
ourCookieName[ourCookieNameSize] = '\0';
TRACE("setting (hacked) cookie of %s, %s\n",
debugstr_w(ourCookieName), debugstr_w(ourCookieData));