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

Added bounds checking to signed int #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ezh247467
Copy link
Contributor

Fixes #174 by ensuring that i > 0 to allow backspacing.

@ezh247467 ezh247467 requested a review from ntlhui February 11, 2025 22:50
@ezh247467 ezh247467 self-assigned this Feb 11, 2025
@ezh247467 ezh247467 enabled auto-merge February 11, 2025 22:50
@ezh247467 ezh247467 changed the title Added bounds checking to unsigned int Added bounds checking to signed int Feb 12, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good, however, you probably want to apply this to the SF_PLATFORM_PARTICLE case as well.

You may also want to consider protecting the buffer overflow condition, since you've solved the underflow condition.

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.

Signed Int Indexing for CLI buffer
2 participants