Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/ssh-funny-url' into maint-2.7
[gitweb.git]
/
wrapper.c
diff --git
a/wrapper.c
b/wrapper.c
index 52001789ded0372becd3f55dda4cd1226c4b6dae..32c6c609da0fbc3a40d17b34de61bffa7c43700c 100644
(file)
--- a/
wrapper.c
+++ b/
wrapper.c
@@
-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))