Skip to content

Commit 84cf512

Browse files
Fix #12701 fuzzing crash in Tokenizer::findGarbageCode() (#6378)
1 parent c4be14d commit 84cf512

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/tokenize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5533,6 +5533,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
55335533
// remove __attribute__((?))
55345534
simplifyAttribute();
55355535

5536+
validate();
5537+
55365538
// Bail out if code is garbage
55375539
if (mTimerResults) {
55385540
Timer t("Tokenizer::simplifyTokens1::simplifyTokenList1::findGarbageCode", mSettings.showtime, mTimerResults);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(n@()###);

0 commit comments

Comments
 (0)