diff options
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -152,6 +152,9 @@ void *xcalloc(size_t nmemb, size_t size) { void *ret; + if (unsigned_mult_overflows(nmemb, size)) + die("data too large to fit into virtual memory space"); + memory_limit_check(size * nmemb, 0); ret = calloc(nmemb, size); if (!ret && (!nmemb || !size)) |