diff options
author | palmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 08:48:29 +0000 |
---|---|---|
committer | palmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 08:48:29 +0000 |
commit | fe0812f743a536ec2e41f93c0c459f34a0433e0b (patch) | |
tree | d0c82a47630e2bf0c694d527ff555c8c41350f1a /net | |
parent | 8f77ff80140c286db92540aeecebbb0143b560e8 (diff) | |
download | chromium_src-fe0812f743a536ec2e41f93c0c459f34a0433e0b.zip chromium_src-fe0812f743a536ec2e41f93c0c459f34a0433e0b.tar.gz chromium_src-fe0812f743a536ec2e41f93c0c459f34a0433e0b.tar.bz2 |
Don't deserialize empty TransportSecurityStates.
BUG=323951
TEST=No more "Failed to deserialize state: " warnings for empty strings.
Non-empty but malformed strings should still cause warnings.
Review URL: https://codereview.chromium.org/103213003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/transport_security_persister.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc index a7e72fd..771d07d 100644 --- a/net/http/transport_security_persister.cc +++ b/net/http/transport_security_persister.cc @@ -303,6 +303,9 @@ bool TransportSecurityPersister::Deserialize(const std::string& serialized, void TransportSecurityPersister::CompleteLoad(const std::string& state) { DCHECK(foreground_runner_->RunsTasksOnCurrentThread()); + if (state.empty()) + return; + bool dirty = false; if (!LoadEntries(state, &dirty)) { LOG(ERROR) << "Failed to deserialize state: " << state; |