diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.17 2002/06/22 23:09:51 stevesk Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.18 2002/06/26 13:20:57 deraadt Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -1453,9 +1453,13 @@ mm_get_keystate(struct monitor *pmonitor) | |||
1453 | void * | 1453 | void * |
1454 | mm_zalloc(struct mm_master *mm, u_int ncount, u_int size) | 1454 | mm_zalloc(struct mm_master *mm, u_int ncount, u_int size) |
1455 | { | 1455 | { |
1456 | int len = size * ncount; | ||
1456 | void *address; | 1457 | void *address; |
1457 | 1458 | ||
1458 | address = mm_malloc(mm, size * ncount); | 1459 | if (len <= 0) |
1460 | fatal("%s: mm_zalloc(%u, %u)", __func__, ncount, size); | ||
1461 | |||
1462 | address = mm_malloc(mm, len); | ||
1459 | 1463 | ||
1460 | return (address); | 1464 | return (address); |
1461 | } | 1465 | } |