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

Signed Int Indexing for CLI buffer #174

Open
ezh247467 opened this issue Feb 11, 2025 · 0 comments · May be fixed by #175
Open

Signed Int Indexing for CLI buffer #174

ezh247467 opened this issue Feb 11, 2025 · 0 comments · May be fixed by #175
Assignees

Comments

@ezh247467
Copy link
Contributor

ezh247467 commented Feb 11, 2025

Describe the bug
A signed int is used for the CLI buffer, which can cause the value to be negative if using backspace enough. This can lead to unintentional memory overwrites. It also deletes the '>' for the CLI.

To Reproduce
Steps to reproduce the behavior:
1.Build the smartfin_pc build
2. Run build/pc_hal/smartfin_pc
3. Enter #CLI without a trailing newline
4. Press backspace (can be multiple times)
5. See error

Expected behavior
No deletion should occur at '>' and i should not be negative.

Screenshots

Hardware Configuration(please complete the following information):

  • Hardware Version [PCB revision]: Docker Build
  • Potted [Y/n]: n
  • Firmware Version: 94bb762
@ezh247467 ezh247467 self-assigned this Feb 11, 2025
@ezh247467 ezh247467 linked a pull request Feb 11, 2025 that will close this issue
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 a pull request may close this issue.

1 participant