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

cfg-source: avoid indexing over the end of the lines array #427

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

bazsi
Copy link
Member

@bazsi bazsi commented Dec 30, 2024

This is not an exploitable problem, as the index that can overflow cannot be controlled externally. It will cause a segfault if there's a location tracking issue or if the source location we are extracting the source text from is incorrect.

Sometimes (especially with location tracking bugs) a grammar location
may be outside of the dimensions of the source text. Make sure we
never index outside of the dimensions of the "lines" array.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@OverOrion OverOrion merged commit 99abe6a into axoflow:main Jan 2, 2025
22 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