diff options
author | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 17:21:34 +0000 |
---|---|---|
committer | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 17:21:34 +0000 |
commit | 0486184e5e233164c7832ce93dce75d0e4b4bbac (patch) | |
tree | 39e3d43103c76fe4c47e79ffcead8055a0b62d0a /net | |
parent | cbf87625962dbbef6e03665b060fbfdfa979153c (diff) | |
download | chromium_src-0486184e5e233164c7832ce93dce75d0e4b4bbac.zip chromium_src-0486184e5e233164c7832ce93dce75d0e4b4bbac.tar.gz chromium_src-0486184e5e233164c7832ce93dce75d0e4b4bbac.tar.bz2 |
Windows: Fix crash in SSLClientSocketNSS::SaveSnapStartInfo() when hello_data_len == 0
BUG=69247
TEST=no crash
Review URL: http://codereview.chromium.org/6106012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/socket/ssl_client_socket_nss.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index 9764be8..c9cbdf6 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -359,13 +359,14 @@ void SSLClientSocketNSS::SaveSnapStartInfo() { if (hello_data_len > std::numeric_limits<uint16>::max()) return; SSLHostInfo::State* state = ssl_host_info_->mutable_state(); - state->server_hello = - std::string(reinterpret_cast<const char *>(hello_data), hello_data_len); if (hello_data_len > 0) { + state->server_hello = + std::string(reinterpret_cast<const char *>(hello_data), hello_data_len); state->npn_valid = true; state->npn_status = GetNextProto(&state->npn_protocol); } else { + state->server_hello.clear(); state->npn_valid = false; } |