wininet(2/2): Fail to commit a url cache entry when the original URL is specified and no local filename is given
Piotr Caban
piotr.caban at gmail.com
Tue Oct 2 03:32:35 CDT 2012
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
More information about the wine-devel
mailing list