aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-06-20 06:26:14 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-20 06:26:14 -0400
commit8ca84481b69513f7bf341c7dd9897023a04d7d1d (patch)
treed6c930de1d67d19a01967e18e8d116421cbe4eda
parent65fd28f743be6e3e3fd8eefa9a517656636fee42 (diff)
[SCTP]: sctp_unpack_cookie() fix
sizeof(pointer) != sizeof(array)... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sctp/sm_make_chunk.c4
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