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

Unified Diff: tools/gn/parser.cc

Issue 2654143005: gn: fix fuzzer bug in parser for stack local (Closed)
Patch Set: Created 3 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
« 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: tools/gn/parser.cc
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc
index 447dfcf5b0fce5466a0aad329594530fe2a25ee9..7e2c7f4338d81a429ed9388a1aa7ea73869b343f 100644
--- a/tools/gn/parser.cc
+++ b/tools/gn/parser.cc
@@ -824,7 +824,7 @@ void Parser::AssignComments(ParseNode* file) {
CHECK_EQ(node, file) << "Only expected on top file node";
continue;
}
- const Location& start = node->GetRange().begin();
+ const Location start = node->GetRange().begin();
while (cur_comment < static_cast<int>(line_comment_tokens_.size())) {
if (start.byte() >= line_comment_tokens_[cur_comment].location().byte()) {
const_cast<ParseNode*>(node)->comments_mutable()->append_before(
« 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