diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 03:26:14 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-20 03:26:14 -0700 |
commit | 8ca84481b69513f7bf341c7dd9897023a04d7d1d (patch) | |
tree | d6c930de1d67d19a01967e18e8d116421cbe4eda /net | |
parent | 65fd28f743be6e3e3fd8eefa9a517656636fee42 (diff) | |
download | op-kernel-dev-8ca84481b69513f7bf341c7dd9897023a04d7d1d.zip op-kernel-dev-8ca84481b69513f7bf341c7dd9897023a04d7d1d.tar.gz |
[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>
Diffstat (limited to 'net')
-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 5e0de3c..2a87736 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( sg.length = bodysize; key = (char *)ep->secret_key[ep->current_key]; - memset(digest, 0x00, sizeof(digest)); + memset(digest, 0x00, SCTP_SIGNATURE_SIZE); sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, 1, digest); if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { /* Try the previous key. */ key = (char *)ep->secret_key[ep->last_key]; - memset(digest, 0x00, sizeof(digest)); + memset(digest, 0x00, SCTP_SIGNATURE_SIZE); sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, 1, digest); |