diff options
author | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:51 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-19 16:48:11 +0100 |
commit | 0f0841b2d28b7463267d4d91577e72e3340a1d3a (patch) | |
tree | ba55fcd2b6e2cc22b30f5afb561dbb3da4c8b6c7 /monitor_mm.c | |
parent | f2a5f5dae656759efb0b76c3d94890b65c197a02 (diff) | |
parent | 8698446b972003b63dfe5dcbdb86acfe986afb85 (diff) |
New upstream release (6.8p1).
Diffstat (limited to 'monitor_mm.c')
-rw-r--r-- | monitor_mm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/monitor_mm.c b/monitor_mm.c index 0ba0658a1..aa47b2ed5 100644 --- a/monitor_mm.c +++ b/monitor_mm.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor_mm.c,v 1.19 2014/01/04 17:50:55 tedu Exp $ */ | 1 | /* $OpenBSD: monitor_mm.c,v 1.21 2015/02/06 23:21:59 millert Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -30,12 +30,14 @@ | |||
30 | #ifdef HAVE_SYS_MMAN_H | 30 | #ifdef HAVE_SYS_MMAN_H |
31 | #include <sys/mman.h> | 31 | #include <sys/mman.h> |
32 | #endif | 32 | #endif |
33 | #include <sys/param.h> | ||
34 | #include "openbsd-compat/sys-tree.h" | 33 | #include "openbsd-compat/sys-tree.h" |
35 | 34 | ||
36 | #include <errno.h> | 35 | #include <errno.h> |
37 | #include <stdarg.h> | 36 | #include <stdarg.h> |
38 | #include <stddef.h> | 37 | #include <stddef.h> |
38 | #ifdef HAVE_STDINT_H | ||
39 | #include <stdint.h> | ||
40 | #endif | ||
39 | #include <stdlib.h> | 41 | #include <stdlib.h> |
40 | #include <string.h> | 42 | #include <string.h> |
41 | 43 | ||
@@ -176,7 +178,7 @@ mm_malloc(struct mm_master *mm, size_t size) | |||
176 | 178 | ||
177 | if (size == 0) | 179 | if (size == 0) |
178 | fatal("mm_malloc: try to allocate 0 space"); | 180 | fatal("mm_malloc: try to allocate 0 space"); |
179 | if (size > SIZE_T_MAX - MM_MINSIZE + 1) | 181 | if (size > SIZE_MAX - MM_MINSIZE + 1) |
180 | fatal("mm_malloc: size too big"); | 182 | fatal("mm_malloc: size too big"); |
181 | 183 | ||
182 | size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE; | 184 | size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE; |