Can someone help me understand this error and what to do about it? This is my code: https://github.com/IMProject/IMUtility/blob/pr-chacha20/Src/utils.c#L243 https://github.com/IMProject/IMUtility/blob/pr-chacha20/Src/crypto/chacha20.c#L87
This is full error:
Src/utils.c:243:23: error: Array index out of bounds; 'buf' buffer size is 0 and it is accessed at offset 3. [ctuArrayIndex] value = (uint32_t)buf[3] << 24u; ^ Src/crypto/chacha20.c:87:41: note: Calling function Utils_Deserialize32LE, 1st argument is uninitialized uint32_t x4 = Utils_Deserialize32LE(&key[0]); ^ Src/utils.c:243:23: note: Using argument buf value = (uint32_t)buf[3] << 24u; ^ make: *** [Makefile:178: cppcheck] Error 1
Thanks.
It seems it was connected to cppcheck v2.9 only, after I moved to 2.13.4 I didn't get this error anymore.
Log in to post a comment.
Can someone help me understand this error and what to do about it?
This is my code:
https://github.com/IMProject/IMUtility/blob/pr-chacha20/Src/utils.c#L243
https://github.com/IMProject/IMUtility/blob/pr-chacha20/Src/crypto/chacha20.c#L87
This is full error:
Thanks.
It seems it was connected to cppcheck v2.9 only, after I moved to 2.13.4 I didn't get this error anymore.