diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-11-05 19:45:21 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-11-05 19:45:21 +0000 |
commit | bfc5cd9317b287a64e4945f38e8c799645dd44f2 (patch) | |
tree | b4e5026de6c4f909cbb2a8db0643166665a7d8d5 /usr.bin/ssh | |
parent | 3fce989a20d32b00353a98594a33df05a96e0e75 (diff) |
handle overflows for size_t larger than u_int; siw@goneko.de, bug #425
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index 423530d54d1..30eb0148153 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.29 2002/09/26 11:38:43 markus Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.30 2002/11/05 19:45:20 markus Exp $"); #include <openssl/dh.h> @@ -1516,7 +1516,7 @@ mm_get_keystate(struct monitor *pmonitor) void * mm_zalloc(struct mm_master *mm, u_int ncount, u_int size) { - size_t len = size * ncount; + size_t len = (size_t) size * ncount; void *address; if (len == 0 || ncount > SIZE_T_MAX / size) |