sds icon indicating copy to clipboard operation
sds copied to clipboard

Potential NULL pointer usage

Open Tangerino opened this issue 9 years ago • 0 comments

In the function sdsnewlen we can see the test on a pointer that was already used as in: sh = s_malloc(hdrlen+initlen+1); if (!init) memset(sh, 0, hdrlen+initlen+1); if (sh == NULL) return NULL; <-----if this can be null, memset breaks

Tangerino avatar Apr 14 '16 07:04 Tangerino