Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: net/http/http_network_transaction.cc

Issue 155359: Add some CHECKs to track down the source of a NULL deref in the SSLClientSocketWin code. (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 5d4c8dd43ab7bb4bb18e4fcde42fd6301b77f686..ca3547c11387add5cc3db261cae94e568333fc0b 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -354,6 +354,11 @@ int HttpNetworkTransaction::Read(IOBuffer* buf, int buf_len,
return ERR_TUNNEL_CONNECTION_FAILED;
}
+ // http://crbug.com/16371: We're seeing |user_buf_->data()| return NULL.
+ // See if the user is passing in an IOBuffer with a NULL |data_|.
+ CHECK(buf);
+ CHECK(buf->data());
+
read_buf_ = buf;
read_buf_len_ = buf_len;
@@ -812,6 +817,10 @@ int HttpNetworkTransaction::DoReadHeaders() {
int buf_len = header_buf_capacity_ - header_buf_len_;
header_buf_->set_data(header_buf_len_);
+ // http://crbug.com/16371: We're seeing |user_buf_->data()| return NULL.
+ // See if the user is passing in an IOBuffer with a NULL |data_|.
+ CHECK(header_buf_->data());
+
return http_stream_->Read(header_buf_, buf_len, &io_callback_);
}
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698