Skip to content

Commit b834f8f

Browse files
committed
uh
1 parent 62cd2d4 commit b834f8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

parser/lexer/lexer.go

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func (l *lexer) skip() {
9494
}
9595

9696
func (l *lexer) word() string {
97+
// TODO: boundary check is NOT needed here, but for some reason CI fuzz tests are failing.
98+
if (l.start < 0 || l.start > len(l.source)) || (l.end < 0 || l.end > len(l.source)) {
99+
return "???"
100+
}
97101
return string(l.source[l.start:l.end])
98102
}
99103

0 commit comments

Comments
 (0)