From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ye Bin <yebin10@huawei.com>
Cc: kadlec@netfilter.org, fw@strlen.de,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [PATCH] netfilter: nf_conntrack_sip: Fix inconsistent of format with argument type in nf_nat_sip.
Date: Tue, 20 Oct 2020 17:17:26 +0200 [thread overview]
Message-ID: <20201020151726.GA19756@salvia> (raw)
In-Reply-To: <20201009070335.63812-1-yebin10@huawei.com>
On Fri, Oct 09, 2020 at 03:03:35PM +0800, Ye Bin wrote:
> Fix follow warning:
> [net/netfilter/nf_nat_sip.c:469]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
Yes, but mangle_packet() takes unsigned int as buflen.
This needs a bit wider look that, I'm afraid, a robot cannot afford.
Thanks for submitting your patch in any case.
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> net/netfilter/nf_nat_sip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nf_nat_sip.c b/net/netfilter/nf_nat_sip.c
> index f0a735e86851..39754fb3a298 100644
> --- a/net/netfilter/nf_nat_sip.c
> +++ b/net/netfilter/nf_nat_sip.c
> @@ -466,7 +466,7 @@ static int mangle_content_len(struct sk_buff *skb, unsigned int protoff,
> &matchoff, &matchlen) <= 0)
> return 0;
>
> - buflen = sprintf(buffer, "%u", c_len);
> + buflen = sprintf(buffer, "%d", c_len);
> return mangle_packet(skb, protoff, dataoff, dptr, datalen,
> matchoff, matchlen, buffer, buflen);
> }
> --
> 2.16.2.dirty
>
prev parent reply other threads:[~2020-10-20 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 7:03 [PATCH] netfilter: nf_conntrack_sip: Fix inconsistent of format with argument type in nf_nat_sip Ye Bin
2020-10-20 15:17 ` Pablo Neira Ayuso [this message]
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=20201020151726.GA19756@salvia \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=yebin10@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.