Skip to content

Commit

Permalink
Fix minor buffer overflow in lexer
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 authored and ksh8281 committed Aug 6, 2024
1 parent fff4e2f commit 23ef579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ void Scanner::scanTemplate(Scanner::ScannerResult* token, bool head)
}
break;
}
auto endIndex = this->index;
auto endIndex = this->eof() ? this->length : this->index;
for (size_t i = currentIndex; i < endIndex; i++) {
raw += this->sourceCharAt(i);
}
Expand Down

0 comments on commit 23ef579

Please sign in to comment.