summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 7da929c6d..8e7ccf894 100644
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: monitor.c,v 1.22 2002/07/22 17:32:56 stevesk Exp $"); 28RCSID("$OpenBSD: monitor.c,v 1.23 2002/08/02 14:43:15 millert Exp $");
29 29
30#include <openssl/dh.h> 30#include <openssl/dh.h>
31 31
@@ -1454,10 +1454,10 @@ mm_get_keystate(struct monitor *pmonitor)
1454void * 1454void *
1455mm_zalloc(struct mm_master *mm, u_int ncount, u_int size) 1455mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
1456{ 1456{
1457 int len = size * ncount; 1457 size_t len = size * ncount;
1458 void *address; 1458 void *address;
1459 1459
1460 if (len <= 0 || size > 65535 || ncount > 65535) 1460 if (len == 0 || ncount > SIZE_T_MAX / size)
1461 fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size); 1461 fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size);
1462 1462
1463 address = mm_malloc(mm, len); 1463 address = mm_malloc(mm, len);