netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: roel kluin <roel.kluin@gmail.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH] cipso: unsigned buf_len cannot be negative
Date: Tue, 28 Oct 2008 18:02:24 -0400	[thread overview]
Message-ID: <200810281802.24600.paul.moore@hp.com> (raw)
In-Reply-To: <49070A69.1090200@gmail.com>

On Tuesday 28 October 2008 8:49:45 am you wrote:
> unsigned buf_len cannot be negative
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Acked-by: Paul Moore <paul.moore@hp.com>

Hi Roel,

Nice catch, thanks for the patch.  Dave, can you apply this patch even 
though it is in a reply and not the original form?  If not let me know 
and I can re-send Roel's mail if he isn't able.

> ---
> diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
> index 490e035..2e78f6b 100644
> --- a/net/ipv4/cipso_ipv4.c
> +++ b/net/ipv4/cipso_ipv4.c
> @@ -2063,9 +2063,10 @@ int cipso_v4_skbuff_setattr(struct sk_buff
> *skb, u32 opt_len;
>  	int len_delta;
>
> -	buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
> -	if (buf_len < 0)
> -		return buf_len;
> +	ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
> +	if (ret_val < 0)
> +		return ret_val;
> +	buf_len = ret_val;
>  	opt_len = (buf_len + 3) & ~3;
>
>  	/* we overwrite any existing options to ensure that we have enough

-- 
paul moore
linux @ hp

           reply	other threads:[~2008-10-28 22:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <49070A69.1090200@gmail.com>]

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=200810281802.24600.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /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).