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

Unified Diff: net/base/io_buffer.cc

Issue 12091071: Make net::IOBuffer 64-bit safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« net/base/io_buffer.h ('K') | « net/base/io_buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/io_buffer.cc
===================================================================
--- net/base/io_buffer.cc (revision 179669)
+++ net/base/io_buffer.cc (working copy)
@@ -13,7 +13,7 @@
}
IOBuffer::IOBuffer(int buffer_size) {
- DCHECK(buffer_size > 0);
+ CHECK_GT(buffer_size, 0);
data_ = new char[buffer_size];
}
@@ -42,6 +42,7 @@
StringIOBuffer::StringIOBuffer(const std::string& s)
: IOBuffer(static_cast<char*>(NULL)),
string_data_(s) {
+ CHECK_LT(s.size(), static_cast<size_t>(INT_MAX));
data_ = const_cast<char*>(string_data_.data());
}
« net/base/io_buffer.h ('K') | « net/base/io_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698