Skip to content

longest_match: handle underflow in assertion #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

inahga
Copy link
Contributor

@inahga inahga commented Oct 29, 2024

Paranoia: this subtraction could underflow in release builds if window_size is small.

This assertion isn't hit in practice, but this makes the unchecked slice reads later on in this function a little bit more palatable.

@folkertdev folkertdev merged commit 0eda88a into trifectatechfoundation:main Oct 29, 2024
18 checks passed
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.

2 participants