summaryrefslogtreecommitdiffstats
path: root/crypto/p224_spake.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 00:12:39 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 00:12:39 +0000
commitb1a975e5d378cea4913320f401f507119ce58fbb (patch)
treef53f61c734183c7426852ad9a002a879e548bb17 /crypto/p224_spake.cc
parent4b1c1134d7b7dbfd5e0fcdec39a79390364c9f16 (diff)
downloadchromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.zip
chromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.tar.gz
chromium_src-b1a975e5d378cea4913320f401f507119ce58fbb.tar.bz2
Coverity: Initialize member variables.
CID=6462,16392,16996,17268,100987,101018,102401,102417,102476,102484,102513 102546,102552,102567,102617,102674,102677,102678,102679,102681,102685, 102714,102750,102751,102781 BUG=none TEST=none R=groby Review URL: http://codereview.chromium.org/9005015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115234 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/p224_spake.cc')
-rw-r--r--crypto/p224_spake.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/p224_spake.cc b/crypto/p224_spake.cc
index ec0c416..af3c2b8 100644
--- a/crypto/p224_spake.cc
+++ b/crypto/p224_spake.cc
@@ -99,6 +99,9 @@ P224EncryptedKeyExchange::P224EncryptedKeyExchange(
PeerType peer_type, const base::StringPiece& password)
: state_(kStateInitial),
is_server_(peer_type == kPeerTypeServer) {
+ memset(&x_, 0, sizeof(x_));
+ memset(&expected_authenticator_, 0, sizeof(expected_authenticator_));
+
// x_ is a random scalar.
base::RandBytes(x_, sizeof(x_));