Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
rev-list-options.txt: typo fix
[gitweb.git]
/
wrapper.c
diff --git
a/wrapper.c
b/wrapper.c
index 8d7dd31c4ba5439652d11e5ada06e0d52bc04e4f..79635f2e1628a1ac25d62ca502c9ee4d0a2b61d6 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;