On 10/02/12 03:31, Juan Lang wrote: @@ -3084,6 +3084,11 @@ static BOOL CommitUrlCacheEntryInternal( SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + if (lpszOriginalUrl && !lpszLocalFileName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } if (lpszOriginalUrl) WARN(": lpszOriginalUrl ignored\n");
The function should succeed if lpszOriginalUrl is specified and it operates on history container. Probably the check for lpszLocalFileName with STICKY_CACHE_ENTRY is also redundant.
I guess that the lpszLocalFileName should be validated in following way: if(pContainer->default_entry_type==NORAML_CACHE_ENTRY && !lpszLocalFileName) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; }
I haven't check what happens for cookies containers.
Cheers, Piotr