aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_auth.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2014-09-16 14:20:33 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2014-09-16 14:20:33 +0000
commit47b80412cdf4d9d09613f394d9fcfc123ddd92f7 (patch)
tree6b620b3f594aa281223b15f7ad4dbcb35d5276d9 /sys/netinet/sctp_auth.c
parent667eb48763a09f08847eda3695c6d25b1240b123 (diff)
downloadsrc-47b80412cdf4d9d09613f394d9fcfc123ddd92f7.tar.gz
src-47b80412cdf4d9d09613f394d9fcfc123ddd92f7.zip
Use a consistent type for the number of HMAC algorithms.
This fixes a bug which resulted in a warning on the userland stack, when compiled on Windows. Thanks to Peter Kasting from Google for reporting the issue and provinding a potential fix. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=271673
Diffstat (limited to 'sys/netinet/sctp_auth.c')
-rw-r--r--sys/netinet/sctp_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c
index 1f301030b2d4..8ce2aab4f936 100644
--- a/sys/netinet/sctp_auth.c
+++ b/sys/netinet/sctp_auth.c
@@ -631,7 +631,7 @@ sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest)
sctp_hmaclist_t *
-sctp_alloc_hmaclist(uint8_t num_hmacs)
+sctp_alloc_hmaclist(uint16_t num_hmacs)
{
sctp_hmaclist_t *new_list;
int alloc_size;
@@ -1438,8 +1438,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
p_random = (struct sctp_auth_random *)phdr;
random_len = plen - sizeof(*p_random);
} else if (ptype == SCTP_HMAC_LIST) {
- int num_hmacs;
- int i;
+ uint16_t num_hmacs;
+ uint16_t i;
if (plen > sizeof(hmacs_store))
break;