diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-02-10 14:45:55 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-10 14:45:55 -0800 |
commit | b308bf18633964102472db5065929a359d4ad265 (patch) | |
tree | ad03f24d6bcaa3228f20f0141e73bdadffaf3cda /wrapper.c | |
parent | 1a9fe453263137be7d42e6fbfc041b5b2d9521d7 (diff) | |
parent | 1368f65002bf39fdde7dd736a75ae35475184371 (diff) | |
download | git-b308bf18633964102472db5065929a359d4ad265.tar.gz git-b308bf18633964102472db5065929a359d4ad265.tar.xz |
Merge branch 'maint'
* maint:
compat: helper for detecting unsigned overflow
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |