wininet: NULL terminate cookie data in load_persistent_cookie function.
This commit is contained in:
parent
2f35659035
commit
a62e3f6442
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue