Commit a62e3f64 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

wininet: NULL terminate cookie data in load_persistent_cookie function.

parent 2f356590
...@@ -170,11 +170,12 @@ static BOOL load_persistent_cookie(LPCWSTR domain, LPCWSTR path) ...@@ -170,11 +170,12 @@ static BOOL load_persistent_cookie(LPCWSTR domain, LPCWSTR path)
if(!cookie) if(!cookie)
return FALSE; return FALSE;
if(!(str = heap_alloc(size)) || !ReadUrlCacheEntryStream(cookie, 0, str, &size, 0)) { if(!(str = heap_alloc(size+1)) || !ReadUrlCacheEntryStream(cookie, 0, str, &size, 0)) {
UnlockUrlCacheEntryStream(cookie, 0); UnlockUrlCacheEntryStream(cookie, 0);
heap_free(str); heap_free(str);
return FALSE; return FALSE;
} }
str[size] = 0;
UnlockUrlCacheEntryStream(cookie, 0); UnlockUrlCacheEntryStream(cookie, 0);
LIST_FOR_EACH(iter, &domain_list) LIST_FOR_EACH(iter, &domain_list)
......
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