1) If one of actual/expected is NULL, we will get a segfault:
if((expected==NULL&&actual==NULL)||// both NULL(expected!=NULL&&actual!=NULL&&// both non NULL(memcmp(expected,actual,len))==0)){return;}/* below, dereferenced expected/actual are used, but we may have * one NULL, and get segfault. */
2) buf is filled before checking for overflow. It means we can have an overflow:
For example:
Patch to add int64_t support, and generic memory buffer tests
I can see issues in
CuAssertMemEquals_LineMsg
:1) If one of
actual
/expected
is NULL, we will get a segfault:2)
buf
is filled before checking for overflow. It means we can have an overflow:For example:
Last edit: Bruno Raoult 2024-01-12