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

Unified Diff: base/json/json_parser.cc

Issue 2823023002: Do not silently drop \u0000 in base::JSONReader (Closed)
Patch Set: Created 3 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 | base/json/json_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_parser.cc
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index be7d21dbb343d7a7afd1f2f24651073e1702ef61..391404f719514a3e42c20d2ad248e1157b267c6d 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -649,7 +649,7 @@ bool JSONParser::DecodeUTF16(std::string* dest_string) {
CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high);
}
- dest_string->append(code_unit8);
+ dest_string->append(code_unit8, offset);
return true;
}
« no previous file with comments | « no previous file | base/json/json_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698