diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-30 20:09:02 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-30 20:09:02 +0000 |
commit | 9422b7dcf2de03f93d223ec86723d22f89798763 (patch) | |
tree | 4cccb448455ec7c77b55a47dc40d78e0d93ad14b /base/pickle.cc | |
parent | 83f2e0564f0d589c0a8d047cc3c47bb828849c0f (diff) | |
download | chromium_src-9422b7dcf2de03f93d223ec86723d22f89798763.zip chromium_src-9422b7dcf2de03f93d223ec86723d22f89798763.tar.gz chromium_src-9422b7dcf2de03f93d223ec86723d22f89798763.tar.bz2 |
Defense-in-depth: initialize some variables.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/517025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/pickle.cc')
-rw-r--r-- | base/pickle.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/pickle.cc b/base/pickle.cc index 491bc3d..2b5b905 100644 --- a/base/pickle.cc +++ b/base/pickle.cc @@ -263,6 +263,7 @@ bool Pickle::ReadString16(void** iter, string16* result) const { bool Pickle::ReadBytes(void** iter, const char** data, int length) const { DCHECK(iter); DCHECK(data); + *data = 0; if (!IteratorHasRoomFor(*iter, length)) return false; @@ -277,6 +278,8 @@ bool Pickle::ReadData(void** iter, const char** data, int* length) const { DCHECK(iter); DCHECK(data); DCHECK(length); + *length = 0; + *data = 0; if (!ReadLength(iter, length)) return false; |