* [PATCH] sctp_unpack_cookie() fix
@ 2006-06-15 11:00 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2006-06-15 11:00 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
sizeof(pointer) != sizeof(array)...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
net/sctp/sm_make_chunk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
ce06687e3f7fea0950ce36423349d113e9cd0d3a
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_coo
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);
--
1.3.GIT
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-15 11:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 11:00 [PATCH] sctp_unpack_cookie() fix Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox