зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562822 - P1. Return NS_ERROR_FILE_CORRUPTED when Safe Browsing cannot read the header of its database. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D42613 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
60f201dfd5
Коммит
22e8951110
|
@ -333,7 +333,10 @@ nsresult HashStore::Open(uint32_t aVersion) {
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = ReadHeader();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
LOG(("Failed to read header for %s", mTableName.get()));
|
||||
return NS_ERROR_FILE_CORRUPTED;
|
||||
}
|
||||
|
||||
rv = SanityCheck(aVersion);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
|
@ -684,7 +684,8 @@ nsresult LookupCache::LoadFromFile(nsCOMPtr<nsIFile>& aFile) {
|
|||
Header header;
|
||||
rv = ReadValue(in, header);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
LOG(("Failed to read header for %s", mTableName.get()));
|
||||
return NS_ERROR_FILE_CORRUPTED;
|
||||
}
|
||||
|
||||
rv = SanityCheck(header);
|
||||
|
|
Загрузка…
Ссылка в новой задаче