The static code analysis tool cppcheck reported a severe error in the code below: I don't know what is the problem.
#define NUM_UPDATE_COUNT 3
#define MAX_NUM_CH_1LINE 27
wchar_t m_cCnt_Buf[NUM_UPDATE_COUNT][MAX_NUM_CH_1LINE];
Init_PushPt();
memset((char *)&m_cCnt_Buf[1], 0x20, sizeof(m_cCnt_Buf[1])); /* Buffer is accessed out of bounds: m_cCnt_Buf */
memset((char *)&m_cCnt_Buf[2], 0x20, sizeof(m_cCnt_Buf[2])); /* Buffer is accessed out of bounds: m_cCnt_Buf */
m_cCnt_Buf[1][2] = '0';
m_cCnt_Buf[2][8] = '0';
There doesn't seem to be anything wrong with the code above. Any ideas why these get picked up and how fix this? Thank you in advance.