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

Unified Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 10216006: Use the correct remaining data length when parsing chunk headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | chrome/browser/safe_browsing/protocol_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/protocol_parser.cc
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index 47ef41d6cf6d77418e3b95aff562647c2c57e155..59a98db48731f4f7b7e6eff9a931234f82b5430e 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -199,7 +199,7 @@ bool SafeBrowsingProtocolParser::ParseChunk(const std::string& list_name,
while (remaining > 0) {
std::string cmd_line;
- if (!GetLine(chunk_data, length, &cmd_line))
+ if (!GetLine(chunk_data, remaining, &cmd_line))
return false; // Error: bad chunk format!
const int line_len = static_cast<int>(cmd_line.length()) + 1;
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/protocol_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698