I can see issues in CuAssertMemEquals_LineMsg: 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: c += sprintf(&buf[c],"expected <\n");...
I can see issues in CuAssertMemEquals_LineMsg: 1) If one of actual/expected is NULL, we will get a segfault: if ((expected == NULL && actual == NULL) || (expected != NULL && actual != NULL && (memcmp(expected, actual, len)) == 0)) { return; } // after that, dereferenced expected/actual are used, wrong if NULL 2) buf is filled before checking for overflow. It means we can have an overflow: For example: for(i=0;i < len;i++) c += sprintf(&buf[c],"%s0x%02x",((i % 16) == 15 ) ? "\n" : (i > 0) ? "," :...
Added "void *" context passed into to test fnuctions to avoid globals
Added "void *" context passed into to test fnuctions to avoid globals
Changed CuSuiteRun to return the number of failures so that I can exit with a non-zero
Change CuSuiteRun to return the number of failures
Patch to add int64_t support, and generic memory buffer tests
adding int64_t and memory test