Skip to content

Commit

Permalink
Do not memset after the end of the array
Browse files Browse the repository at this point in the history
Fixes an error found by cppcheck:
nxdn.cpp:260:12: error: Buffer is accessed out of bounds: m_syncBuffer [bufferAccessOutOfBounds]
  • Loading branch information
dforsi committed Feb 18, 2023
1 parent 4e954c2 commit 91c1230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nxdn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ DSDNXDN::DSDNXDN(DSDDecoder *dsdDecoder) :
y(0),
z(0)
{
memset(m_syncBuffer, 0, 11);
memset(m_syncBuffer, 0, 10);
memset(m_lichBuffer, 0, 8);

m_rfChannel = NXDNRFCHUnknown;
Expand Down

0 comments on commit 91c1230

Please sign in to comment.