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

Fix out-of-bound array access in T1000X Sensor #4663

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

fifieldt
Copy link
Contributor

@fifieldt fifieldt commented Sep 9, 2024

if u8i == 135, then u8i++ runs, the loop exits since u8i == 136, then value for u8i is 136 after the for loop.

then in the next line, ntc_res2[u8i] will read past the end of the array

if u8i == 135, then u8i++ runs, the loop exits since u8i == 136,
then value for u8i is 136 after the for loop.

then in the next line, ntc_res2[u8i] will read past the end
 of the array
Copy link
Member

@caveman99 caveman99 left a comment

Choose a reason for hiding this comment

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

nice catch

@thebentern thebentern merged commit e9d55de into meshtastic:master Sep 9, 2024
102 of 103 checks passed
@fifieldt fifieldt deleted the fix-oob-t1k branch September 9, 2024 12:57
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.

3 participants