fixes the last missing null terminated pointer
@@ -21,7 +21,7 @@ void **
ntl_calloc (size_t nmem, size_t elem_size)
{
void ** p = ntl_malloc(nmem, elem_size);
- char * start_to_zero = (char *)p + (nmem * sizeof(void *));
+ char * start_to_zero = (char *)p + ((nmem + 1) * sizeof(void *));
memset(start_to_zero, 0, nmem * elem_size);
return p;
}
