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

Potential serial input buffer overflow bug in EmonTxV4_config.ino #15

Open
nmcgann opened this issue Oct 4, 2023 · 0 comments
Open

Comments

@nmcgann
Copy link

nmcgann commented Oct 4, 2023

The serial input buffer in getSettings() can overflow with a long input sequence as the test if (idx<64) { is incorrect.

The buffer input is 64 characters long, but it should reserve 1 byte for the \0 string terminator. With 0-based addressing that means that only 0-62 are valid character addresses, so the test should be idx<63 to ensure the zero terminator is never overwritten with a character.

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

No branches or pull requests

1 participant