summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:05:06 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-04 00:05:06 +0000
commit35a2cb9b41c2828ad2585b01689281bb22e29596 (patch)
tree3f6d39ee2273e5c10ab2b9a8ffb82100fe93db1c /monitor.c
parent04f9af7dfcac6a2230bbb574ea8ddaa5e39baa04 (diff)
- deraadt@cvs.openbsd.org 2002/06/27 09:08:00
[monitor.c] improve mm_zalloc check; markus ok
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 86562243..1ac22782 100644
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: monitor.c,v 1.19 2002/06/26 14:49:36 deraadt Exp $");
+RCSID("$OpenBSD: monitor.c,v 1.20 2002/06/27 09:08:00 deraadt Exp $");
#include <openssl/dh.h>
@@ -1456,7 +1456,7 @@ mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
int len = size * ncount;
void *address;
- if (len <= 0)
+ if (len <= 0 || size > 65535 || ncount > 65535)
fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size);
address = mm_malloc(mm, len);