cryptnet: Handle SystemTimeToFileTime failure in HTTP_RetrieveEncodedObjectW.
This commit is contained in:
parent
ef4db477f0
commit
c3a23a99a2
|
@ -957,18 +957,12 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
|
||||||
if (ret && !(dwRetrievalFlags & CRYPT_DONT_CACHE_RESULT))
|
if (ret && !(dwRetrievalFlags & CRYPT_DONT_CACHE_RESULT))
|
||||||
{
|
{
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
|
FILETIME ft;
|
||||||
DWORD len = sizeof(st);
|
DWORD len = sizeof(st);
|
||||||
|
|
||||||
if (HttpQueryInfoW(hHttp,
|
if (HttpQueryInfoW(hHttp, HTTP_QUERY_EXPIRES | HTTP_QUERY_FLAG_SYSTEMTIME,
|
||||||
HTTP_QUERY_EXPIRES | HTTP_QUERY_FLAG_SYSTEMTIME, &st,
|
&st, &len, NULL) && SystemTimeToFileTime(&st, &ft))
|
||||||
&len, NULL))
|
CRYPT_CacheURL(pszURL, pObject, dwRetrievalFlags, ft);
|
||||||
{
|
|
||||||
FILETIME ft;
|
|
||||||
|
|
||||||
SystemTimeToFileTime(&st, &ft);
|
|
||||||
CRYPT_CacheURL(pszURL, pObject, dwRetrievalFlags,
|
|
||||||
ft);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
InternetCloseHandle(hHttp);
|
InternetCloseHandle(hHttp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue