mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Fix incorrect Lexer VERIFY when parsing Unicode characters
This bug was discovered via OSS fuzz, it's possible to fall through to this assert with a char_size == 1, so we need to account for that in the VERIFY(..). Repro test case can be found in the OSS fuzz bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37296
This commit is contained in:
committed by
Linus Groh
parent
0f3f814945
commit
77d8a65498
@@ -201,7 +201,7 @@ void Lexer::consume()
|
||||
char_size = 4;
|
||||
}
|
||||
|
||||
VERIFY(char_size > 1);
|
||||
VERIFY(char_size >= 1);
|
||||
--char_size;
|
||||
|
||||
m_position += char_size;
|
||||
|
||||
Reference in New Issue
Block a user