summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/mac.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2003-09-18 13:02:21 +0000
committermiod <miod@openbsd.org>2003-09-18 13:02:21 +0000
commit14bbd5bc85ee10277301549dcca2dd480e6d6c02 (patch)
tree8ad369db8b22c535acd0405d3494d5ab56da1175 /usr.bin/ssh/mac.c
parentspacing; (diff)
downloadwireguard-openbsd-14bbd5bc85ee10277301549dcca2dd480e6d6c02.tar.xz
wireguard-openbsd-14bbd5bc85ee10277301549dcca2dd480e6d6c02.zip
A few signedness fixes for harmless situations; markus@ ok
Diffstat (limited to 'usr.bin/ssh/mac.c')
-rw-r--r--usr.bin/ssh/mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/mac.c b/usr.bin/ssh/mac.c
index ab9a03d84e8..097f0b93bf8 100644
--- a/usr.bin/ssh/mac.c
+++ b/usr.bin/ssh/mac.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: mac.c,v 1.5 2002/05/16 22:02:50 markus Exp $");
+RCSID("$OpenBSD: mac.c,v 1.6 2003/09/18 13:02:21 miod Exp $");
#include <openssl/hmac.h>
@@ -77,7 +77,7 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen)
if (mac->key == NULL)
fatal("mac_compute: no key");
- if (mac->mac_len > sizeof(m))
+ if ((u_int)mac->mac_len > sizeof(m))
fatal("mac_compute: mac too long");
HMAC_Init(&c, mac->key, mac->key_len, mac->md);
PUT_32BIT(b, seqno);