Skip to content
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

Fix arithmetic overflow in LineRange::parse_range #2698

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

skoriop
Copy link

@skoriop skoriop commented Oct 4, 2023

Fixes #2674

Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I think this is a reasonable fix for this pathological edge case, even if it doesn't lead to "correct" behavior. But avoiding the panic is probably a good idea.

Even better would be to show some error message, but that would probably require larger-scale changes. And it's probably not worth it for this case.

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.

Arithmetic overflow occurs while using API LineRange::from()
2 participants