Skip to content

Conversation

@ajroetker
Copy link

Add bounds check before accessing n.alignments[idx+totalBytesToRemove] to prevent panic when removing characters near the end of a string.

The bug occurred when totalBytesToRemove would cause the index to exceed the alignments slice length, e.g., accessing index 201 in a slice of length 200.

Add bounds check before accessing n.alignments[idx+totalBytesToRemove]
to prevent panic when removing characters near the end of a string.

The bug occurred when totalBytesToRemove would cause the index to
exceed the alignments slice length, e.g., accessing index 201 in a
slice of length 200.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant