summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl <agl@chromium.org>2015-01-05 18:58:48 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-06 02:59:48 +0000
commitde0d76005c4cbcc115d96ac0fc4b9afcedcd8a07 (patch)
treec577304661265762f6e7f0d81129576c4ce58212
parent0287a1a1750bbe22d3b4efb29b08b9aed13e723e (diff)
downloadchromium_src-de0d76005c4cbcc115d96ac0fc4b9afcedcd8a07.zip
chromium_src-de0d76005c4cbcc115d96ac0fc4b9afcedcd8a07.tar.gz
chromium_src-de0d76005c4cbcc115d96ac0fc4b9afcedcd8a07.tar.bz2
CRLSet: don't crash if unrequested delta CRL set returned.
There are a handful of odd crashes that I can't explain in ApplyDelta (see bug). After reviewing the code, one possibility (I still can't explain how it could happen) is that Chrome receives a delta CRL from the update server when it didn't have any CRL to apply it to. Even if this isn't happening (which is probably true), Chrome should still be resilient no matter what the update server sends it. BUG=443292 Review URL: https://codereview.chromium.org/815793003 Cr-Commit-Position: refs/heads/master@{#310041}
-rw-r--r--chrome/browser/net/crl_set_fetcher.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc
index 4035075..14841e94 100644
--- a/chrome/browser/net/crl_set_fetcher.cc
+++ b/chrome/browser/net/crl_set_fetcher.cc
@@ -185,6 +185,13 @@ bool CRLSetFetcher::Install(const base::DictionaryValue& manifest,
return false;
}
+ if (is_delta && !crl_set_.get()) {
+ // The update server gave us a delta update, but we don't have any base
+ // revision to apply it to.
+ LOG(WARNING) << "Received unsolicited delta update.";
+ return false;
+ }
+
if (!is_delta) {
if (!net::CRLSetStorage::Parse(crl_set_bytes, &crl_set_)) {
LOG(WARNING) << "Failed to parse CRL set from update CRX";