Skip to content

Commit 2e126da

Browse files
fix: Avoid out-of-bounds with unbalanced identifier escapes. (#87)
1 parent ef6cb43 commit 2e126da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bindings/go/scip/symbol.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ func (s *symbolParser) acceptEscapedIdentifier(what string, escapeCharacter rune
201201
ch := s.current()
202202
if ch == escapeCharacter {
203203
s.index++
204+
if s.index >= len(s.Symbol) {
205+
break
206+
}
204207
if s.current() == escapeCharacter {
205208
// Escaped space character.
206209
builder.WriteRune(ch)

0 commit comments

Comments
 (0)