summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-11-05 19:45:20 +0000
committermarkus <markus@openbsd.org>2002-11-05 19:45:20 +0000
commita5128fe7035adf33ab8fcf7881e9c54d53b60b44 (patch)
treea010fa2c851c67de4120c790b8e5e432b77a0e5c
parentAdd a WEAK_ALIAS macro, to be used by libc/libc_r shortly. (diff)
downloadwireguard-openbsd-a5128fe7035adf33ab8fcf7881e9c54d53b60b44.tar.xz
wireguard-openbsd-a5128fe7035adf33ab8fcf7881e9c54d53b60b44.zip
handle overflows for size_t larger than u_int; siw@goneko.de, bug #425
-rw-r--r--usr.bin/ssh/monitor.c4
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)