pest
pest copied to clipboard
oss-fuzz: pest:parser: ASSERT: index out of bounds: the len is 0 but the index is 8
Describe the bug Fuzzing found a crash due to indexing an empty vector. https://github.com/pest-parser/pest/blob/9c42f1293aa999b24cd8dea70469da3be3a4c9eb/pest/src/parser_state.rs#L309
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 8', [pest/pest/src/parser_state.rs:309](https://github.com/pest-parser/pest/blob/9c42f1293aa999b24cd8dea70469da3be3a4c9eb/pest/src/parser_state.rs#L309):27
To Reproduce minimal sample:
f={f{/*/*6/*6/*6/*5/*6*6/*6/*6/*5/*7//*
Expected behavior No crash
Additional context https://oss-fuzz.com/testcase-detail/5457878206513152