From: Wei Yongjun Date: Thu, 31 Mar 2011 23:38:54 +0000 (+0000) Subject: sctp: fix auth_hmacs field's length of struct sctp_cookie X-Git-Tag: v2.6.39-rc2~7^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=028dba0ac3fc3c82da06110b011fce22a5ffad00;p=platform%2Fupstream%2Fkernel-adaptation-pc.git sctp: fix auth_hmacs field's length of struct sctp_cookie auth_hmacs field of struct sctp_cookie is used for store Requested HMAC Algorithm Parameter, and each HMAC Identifier is 2 bytes, so the length should be: SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2 Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185c..0f6e60a 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -422,7 +422,7 @@ struct sctp_cookie { __u32 adaptation_ind; __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; - __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; + __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; /* This is a shim for my peer's INIT packet, followed by