diff options
Diffstat (limited to 'crypto/openssh/monitor_mm.c')
-rw-r--r-- | crypto/openssh/monitor_mm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/openssh/monitor_mm.c b/crypto/openssh/monitor_mm.c index 0ba0658..aa47b2e 100644 --- a/crypto/openssh/monitor_mm.c +++ b/crypto/openssh/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.19 2014/01/04 17:50:55 tedu Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.21 2015/02/06 23:21:59 millert Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -30,12 +30,14 @@ #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> #endif -#include <sys/param.h> #include "openbsd-compat/sys-tree.h" #include <errno.h> #include <stdarg.h> #include <stddef.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif #include <stdlib.h> #include <string.h> @@ -176,7 +178,7 @@ mm_malloc(struct mm_master *mm, size_t size) if (size == 0) fatal("mm_malloc: try to allocate 0 space"); - if (size > SIZE_T_MAX - MM_MINSIZE + 1) + if (size > SIZE_MAX - MM_MINSIZE + 1) fatal("mm_malloc: size too big"); size = ((size + (MM_MINSIZE - 1)) / MM_MINSIZE) * MM_MINSIZE; |