# Prevent out of bounds access in \`recursive_score_match\` \(\#35630\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/69794db3316921e778f8d90cd17d403e1e5f000f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 69794db3316921e778f8d90cd17d403e1e5f000f

Requested commit: 69794db3316921e778f8d90cd17d403e1e5f000f

Commit: 69794db3316921e778f8d90cd17d403e1e5f000f

Tree: 7db3fcbfca0d06c7ec24552db6f5a932549a3ede

Author: Lukas Wirth

Committer: GitHub

## Message

```
Prevent out of bounds access in `recursive_score_match` (#35630)

Closes https://github.com/zed-industries/zed/issues/33668

The recursive case increments both indices by 1, but only one of the two
had a base case check in the function prologue so the other could spill
over into a different matrix row or out of bounds entirely.

Lacking a test as I haven't figured out a test case yet.

Release Notes:

- Fixed out of bounds panic in fuzzy matching
```

## Parents

- [c59c436a11d80a8c7ae571e0be075e3b5933419d](https://git.cafe/gitcafe/zed/commit/c59c436a11d80a8c7ae571e0be075e3b5933419d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/69794db3316921e778f8d90cd17d403e1e5f000f?format=markdown)
