Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
compat: fall back on __va_copy if available
[gitweb.git]
/
wrapper.c
diff --git
a/wrapper.c
b/wrapper.c
index 55b074ec46b0a222b03f8bea42f4d5cdd9811293..4c147d6c48c000bab636fad3edc2fe7da6670948 100644
(file)
--- a/
wrapper.c
+++ b/
wrapper.c
@@
-53,7
+53,7
@@
void *xmalloc(size_t size)
void *xmallocz(size_t size)
{
void *ret;
- if (
size + 1 < size
)
+ if (
unsigned_add_overflows(size, 1)
)
die("Data too large to fit into virtual memory space.");
ret = xmalloc(size + 1);
((char*)ret)[size] = 0;