From: Jan Engelhardt Date: Tue, 30 Dec 2008 11:03:39 +0000 (+0100) Subject: rateest: guard against segfault X-Git-Tag: v1.4.3~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3d0a7b800277fcc4401f19a584edf1d7dfaeda9;p=thirdparty%2Fiptables.git rateest: guard against segfault Signed-off-by: Jan Engelhardt Signed-off-by: Pablo Neira Ayuso --- diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c index ebea4376..333239d9 100644 --- a/extensions/libxt_rateest.c +++ b/extensions/libxt_rateest.c @@ -306,6 +306,9 @@ rateest_final_check(unsigned int flags) { struct xt_rateest_match_info *info = rateest_info; + if (info == NULL) + exit_error(PARAMETER_PROBLEM, "rateest match: " + "you need to specify some flags"); if (!(info->flags & XT_RATEEST_MATCH_REL)) info->flags |= XT_RATEEST_MATCH_ABS; }