diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-09-22 21:05:50 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-09-22 21:05:50 +1000 |
commit | c0815c927e177f27b1bcd6370e4c2b10caf95efe (patch) | |
tree | ce3ca9f4f2a30ef0281b095dd01ef6c66454a8f1 /mac.c | |
parent | fb16b2411eda857cd358dc4c9c63b66edc217a51 (diff) |
- miod@cvs.openbsd.org 2003/09/18 13:02:21
[authfd.c bufaux.c dh.c mac.c ssh-keygen.c]
A few signedness fixes for harmless situations; markus@ ok
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: mac.c,v 1.5 2002/05/16 22:02:50 markus Exp $"); | 26 | RCSID("$OpenBSD: mac.c,v 1.6 2003/09/18 13:02:21 miod Exp $"); |
27 | 27 | ||
28 | #include <openssl/hmac.h> | 28 | #include <openssl/hmac.h> |
29 | 29 | ||
@@ -77,7 +77,7 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) | |||
77 | 77 | ||
78 | if (mac->key == NULL) | 78 | if (mac->key == NULL) |
79 | fatal("mac_compute: no key"); | 79 | fatal("mac_compute: no key"); |
80 | if (mac->mac_len > sizeof(m)) | 80 | if ((u_int)mac->mac_len > sizeof(m)) |
81 | fatal("mac_compute: mac too long"); | 81 | fatal("mac_compute: mac too long"); |
82 | HMAC_Init(&c, mac->key, mac->key_len, mac->md); | 82 | HMAC_Init(&c, mac->key, mac->key_len, mac->md); |
83 | PUT_32BIT(b, seqno); | 83 | PUT_32BIT(b, seqno); |