summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/stdlib/malloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c
index 5db51d58ee..6c38d6ad87 100644
--- a/src/lib/libc/stdlib/malloc.c
+++ b/src/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc.c,v 1.156 2014/04/23 05:43:25 otto Exp $ */ 1/* $OpenBSD: malloc.c,v 1.157 2014/04/23 10:47:15 espie Exp $ */
2/* 2/*
3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> 4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -1388,6 +1388,9 @@ realloc(void *ptr, size_t size)
1388} 1388}
1389 1389
1390 1390
1391/* this is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
1392 * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
1393 */
1391#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4)) 1394#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
1392 1395
1393void * 1396void *