netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: libxt_rateest: fix segfault
Date: Tue, 09 Dec 2008 15:05:17 +0100	[thread overview]
Message-ID: <493E7B1D.7030003@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0812081818050.2016@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> commit 48c13b071a7f37ea57f93312c2547d5512b78f3e
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date:   Mon Dec 8 18:23:12 2008 +0100
> 
> libxt_rateest: fix segfault
> 
> When running `ip6tables -m rateest` without any other arguments,
> rateest did segfault.
> ---
>  extensions/libxt_rateest.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c
> index ebea437..f0dd577 100644
> --- a/extensions/libxt_rateest.c
> +++ b/extensions/libxt_rateest.c
> @@ -306,7 +306,7 @@ rateest_final_check(unsigned int flags)
>  {
>  	struct xt_rateest_match_info *info = rateest_info;
>  
> -	if (!(info->flags & XT_RATEEST_MATCH_REL))
> +	if (info != NULL && !(info->flags & XT_RATEEST_MATCH_REL))
>  		info->flags |= XT_RATEEST_MATCH_ABS;

I think we should print an error message instead. The kernel will
refuse it anyways.

  reply	other threads:[~2008-12-09 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 17:24 libxt_rateest: fix segfault Jan Engelhardt
2008-12-09 14:05 ` Patrick McHardy [this message]
2008-12-24 19:15   ` Jan Engelhardt
2008-12-30 11:05     ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493E7B1D.7030003@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).