Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UITask::showAlert copies its argument with strcpy into an 80-byte member. A longer alert can overwrite adjacent UI state. Use the existing size-bounded StrHelper::strzcpy with sizeof(_alert); shorter text and the alert duration keep their behavior.
Validation:
python test/ui_new_alert/run.pypassed on Windows.python3 test/ui_new_alert/run.py --sanitizepassed under Linux ASan/UBSan.python test/ui_new_alert/run.py --source-ref 42ded8da646c7fbe9ccb8c522441f7aa87767344fails against the original code, as expected.pio run -e muzi_base_uno_superIO_companion_radio_blepassed against dev (RadioLib 7.8.1).git diff --checkpassed.The standalone test extracts the real showAlert and strzcpy methods and the real alert-array declaration. It checks empty, short, boundary-length and oversized strings with adjacent-state canaries, without compiling a replacement implementation of the copy method. No protocol, notification policy or display layout changes.