Skip to content

Fix stack-buffer-overflow in parser.c #110

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GabrielBarrantes
Copy link

A stack-buffer-overflow occurred when a decorator (e.g., rounding or SAE) was encountered without a preceding operand. This caused the operand index to underflow, leading to invalid memory access.

Added a check to ensure opnum > 0 before decrementing, preventing the underflow and fixing the crash when parsing malformed decorators.

Fixes: #3392931

A stack-buffer-overflow occurred when a decorator (e.g., rounding or SAE)
was encountered without a preceding operand. This caused the operand index
to underflow, leading to invalid memory access.

Added a check to ensure `opnum > 0` before decrementing, preventing the
underflow and fixing the crash when parsing malformed decorators.

Fixes: #3392931

Signed-off-by: Gabriel Barrantes <[email protected]>
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