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 array bounds violation #4

Open
softhack007 opened this issue Nov 4, 2021 · 0 comments
Open

potential array bounds violation #4

softhack007 opened this issue Nov 4, 2021 · 0 comments

Comments

@softhack007
Copy link

softhack007 commented Nov 4, 2021

The segment buffering code below possibly overwrites memory outside of the array bounds, in case of i = 7

xtm1638/xtm1638.h

Lines 633 to 634 in e6da698

#ifdef XTM_APPLY_CACHED_SEGMENTS
uint8_t _segbuff[8]; // consumes 8 bytes of dynamic memory

xtm1638/xtm1638.cpp

Lines 422 to 423 in e6da698

if( i < 8 )
{ _segbuff[i] = _segbuff[i+1] = 0x00; }

@softhack007 softhack007 changed the title array bounds violation potential array bounds violation Nov 4, 2021
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