Collections-C icon indicating copy to clipboard operation
Collections-C copied to clipboard

The call to mem_alloc in cc_array_subarray() is unsafe

Open kbridge opened this issue 2 years ago • 0 comments

https://github.com/srdja/Collections-C/blob/5285da8dcd3dbfe32f960abc7bf287db0d2600c5/src/cc_array.c#L479

Because ar->capacity * sizeof(void*) can overflow. Should use ar->mem_calloc.

kbridge avatar Nov 19 '22 20:11 kbridge