250304.8 · a8ce2ff09af51b39be0d76091e6117caccd1b5c0
Avoid zero-length `calloc` (#3280)
Using `calloc` function with a count of zero elements is implementation defined and it may cause allocation errors on some platforms (ref #3277). This commit fixes `jv_mem_calloc` callers to avoid undefined behavior.
reading declarations
Changes to src/jv_alloc.h. All files
@@ -2,7 +2,6 @@ #define JV_ALLOC_H #include <stddef.h>-#include "jv.h" void* jv_mem_alloc(size_t); void* jv_mem_alloc_unguarded(size_t);