diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.22 2002/07/22 17:32:56 stevesk Exp $"); | 28 | RCSID("$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) | |||
1454 | void * | 1454 | void * |
1455 | mm_zalloc(struct mm_master *mm, u_int ncount, u_int size) | 1455 | mm_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); |