]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
rateest: guard against segfault
authorJan Engelhardt <jengelh@medozas.de>
Tue, 30 Dec 2008 11:03:39 +0000 (12:03 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Dec 2008 11:03:39 +0000 (12:03 +0100)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_rateest.c

index ebea43763fe042446036fac9f44fadb4c7d4c54e..333239d98cf92135bdf8ab692914d2e17ff9f093 100644 (file)
@@ -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;
 }