Re: [PATCH] netfilter: nf_conntrack_sctp: fix build warning
From: David Miller
Date: Sun Nov 23 2008 - 17:00:09 EST
From: Wu Fengguang <fengguang.wu@xxxxxxxxx>
Date: Sun, 23 Nov 2008 19:33:15 +0800
linux-net is not the mailing list for network development
discussion, it is for user questions. Post patches and
developer questions to netdev@xxxxxxxxxxxxxxx instead.
> net/netfilter/nf_conntrack_proto_sctp.c: In function âsctp_packetâ:
> net/netfilter/nf_conntrack_proto_sctp.c:376: warning: array subscript is above array bounds
>
> Signed-off-by: Wu Fengguang <wfg@xxxxxxxxxxxxxxx>
> ---
>
> DISCLAIMER: I'm newbie to the code, and this fix could be wrong!
>
> diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
> index ae8c260..d31ced4 100644
> --- a/net/netfilter/nf_conntrack_proto_sctp.c
> +++ b/net/netfilter/nf_conntrack_proto_sctp.c
> @@ -373,6 +373,9 @@ static int sctp_packet(struct nf_conn *ct,
> }
> write_unlock_bh(&sctp_lock);
>
> + if (new_state == SCTP_CONNTRACK_MAX)
> + goto out;
> +
> nf_ct_refresh_acct(ct, ctinfo, skb, sctp_timeouts[new_state]);
>
> if (old_state == SCTP_CONNTRACK_COOKIE_ECHOED &&
> --
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
èº{.nÇ+·®+%Ëlzwm
ébëæìr¸zX§»Þ)í
æèw*jg¬±¨¶Ýj/êäz¹Þà2Þ¨èÚ&¢)ß«a¶Úþø®G«éh®æj:+v¨wèÙ