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

Unified Diff: content/browser/net/url_request_abort_on_end_job.cc

Issue 8540011: Fix URLRequestJobAbortOnEndJob::ReadRawData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/net/url_request_abort_on_end_job.cc
diff --git a/content/browser/net/url_request_abort_on_end_job.cc b/content/browser/net/url_request_abort_on_end_job.cc
index 00592f9ae565ff313953bce3d289cdb4f81cee0c..609d7bbdc027ef683042424e3345833807855199 100644
--- a/content/browser/net/url_request_abort_on_end_job.cc
+++ b/content/browser/net/url_request_abort_on_end_job.cc
@@ -90,7 +90,7 @@ bool URLRequestAbortOnEndJob::ReadRawData(net::IOBuffer* buf,
const int max_bytes,
int* bytes_read) {
if (!sent_data_) {
- *bytes_read = std::max(size_t(max_bytes), sizeof(kPageContent));
+ *bytes_read = std::min(size_t(max_bytes), sizeof(kPageContent));
std::memcpy(buf->data(), kPageContent, *bytes_read);
sent_data_ = true;
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698