diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 17:08:41 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-08 17:08:41 +0000 |
commit | a16f8ccdc5fa2e30dff04f8ae1fc07bdfdec9981 (patch) | |
tree | ee8416a0dca15e37d06fd365cb7c005ffa0c766b /net/http/http_cache.cc | |
parent | f1852f29f57531e69ce0d4b6ffafb4a9e9b511c2 (diff) | |
download | chromium_src-a16f8ccdc5fa2e30dff04f8ae1fc07bdfdec9981.zip chromium_src-a16f8ccdc5fa2e30dff04f8ae1fc07bdfdec9981.tar.gz chromium_src-a16f8ccdc5fa2e30dff04f8ae1fc07bdfdec9981.tar.bz2 |
Http Cache: Add some debug code to track a bug. Basically
just an early check for the headers.
BUG=56449
TEST=none
Review URL: http://codereview.chromium.org/3569025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index a4a3f74..5b926ea 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -367,6 +367,14 @@ void HttpCache::Suspend(bool suspend) { bool HttpCache::ParseResponseInfo(const char* data, int len, HttpResponseInfo* response_info, bool* response_truncated) { + // This block is here just to debug a Linux-only crash (bug 56449). + // TODO(rvargas): Remove this. + if (len < 4) + return false; + int payload_size = *reinterpret_cast<const int*>(data); + if (payload_size < 4) + return false; + Pickle pickle(data, len); return response_info->InitFromPickle(pickle, response_truncated); } |