diff options
-rw-r--r-- | net/sctp/sm_make_chunk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 5e0de3c0eead..2a8773691695 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1402,14 +1402,14 @@ struct sctp_association *sctp_unpack_cookie( | |||
1402 | sg.length = bodysize; | 1402 | sg.length = bodysize; |
1403 | key = (char *)ep->secret_key[ep->current_key]; | 1403 | key = (char *)ep->secret_key[ep->current_key]; |
1404 | 1404 | ||
1405 | memset(digest, 0x00, sizeof(digest)); | 1405 | memset(digest, 0x00, SCTP_SIGNATURE_SIZE); |
1406 | sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, | 1406 | sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, |
1407 | 1, digest); | 1407 | 1, digest); |
1408 | 1408 | ||
1409 | if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { | 1409 | if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { |
1410 | /* Try the previous key. */ | 1410 | /* Try the previous key. */ |
1411 | key = (char *)ep->secret_key[ep->last_key]; | 1411 | key = (char *)ep->secret_key[ep->last_key]; |
1412 | memset(digest, 0x00, sizeof(digest)); | 1412 | memset(digest, 0x00, SCTP_SIGNATURE_SIZE); |
1413 | sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, | 1413 | sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, |
1414 | &sg, 1, digest); | 1414 | &sg, 1, digest); |
1415 | 1415 | ||