sctp_unpack_cookie() fix
Subsystems (2)
PATCH 1/1 sctp_unpack_cookie() fix
sizeof(pointer) != sizeof(array)...
Signed-off-by Al Viro <[email protected]>
---
net/sctp/sm_make_chunk.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
ce06687e3f7fea0950ce36423349d113e9cd0d3a
net/sctp/sm_make_chunk.c +2 -2
@@ -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);
Signature · 1 line
1.3.GIT