Skip to content

Commit 444fa1a

Browse files
committed
go-fuzz found a crasher. Fixed it
1 parent d497d4b commit 444fa1a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lexer/lexer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ func (s *Lexer) readString() (Token, *gqlerror.Error) {
394394
case 't':
395395
buf.WriteByte('\t')
396396
case 'x':
397+
if s.end+4 >= inputLen {
398+
s.end++
399+
s.endRunes++
400+
break
401+
}
397402
// look two ahead
398403
r, ok := unhex2(s.Input[s.end+2 : s.end+4])
399404
if !ok {

0 commit comments

Comments
 (0)