From: Dan Carpenter Date: Sat, 20 Apr 2013 11:24:55 +0000 (+0300) Subject: ipvs: off by one in set_sctp_state() X-Git-Tag: upstream/snapshot3+hdmi~5164^2~47^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bfbfbf91fb3a29a775f6ea11e3a8198685590ae;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ipvs: off by one in set_sctp_state() The sctp_events[] come from sch->type in set_sctp_state(). They are between 0-255 so that means we need 256 elements in the array. I believe that because of how the code is aligned there is normally a hole after sctp_events[] so this patch doesn't actually change anything. Signed-off-by: Dan Carpenter Acked-by: Julian Anastasov Signed-off-by: Simon Horman --- diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c index 6e14a7b..8646488 100644 --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c @@ -208,7 +208,7 @@ enum ipvs_sctp_event_t { IP_VS_SCTP_EVE_LAST }; -static enum ipvs_sctp_event_t sctp_events[255] = { +static enum ipvs_sctp_event_t sctp_events[256] = { IP_VS_SCTP_EVE_DATA_CLI, IP_VS_SCTP_EVE_INIT_CLI, IP_VS_SCTP_EVE_INIT_ACK_CLI,