netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libnftnl PATCH] ruleset: fix erroneus call to snprintf
@ 2014-05-06 15:09 Arturo Borrero Gonzalez
  2014-05-06 15:53 ` Arturo Borrero Gonzalez
  0 siblings, 1 reply; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-06 15:09 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pablo

This snprintf call is taking an erroneus value for size.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/ruleset.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ruleset.c b/src/ruleset.c
index 98c4367..a19cbc1 100644
--- a/src/ruleset.c
+++ b/src/ruleset.c
@@ -825,7 +825,7 @@ nft_ruleset_do_snprintf(char *buf, size_t size, const struct nft_ruleset *rs,
 		SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 	}
 
-	ret = snprintf(buf+offset, size, "%s", nft_ruleset_o_closetag(type));
+	ret = snprintf(buf+offset, len, "%s", nft_ruleset_o_closetag(type));
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
 	ret = nft_event_footer_snprintf(buf+offset, len, type, flags);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [libnftnl PATCH] ruleset: fix erroneus call to snprintf
  2014-05-06 15:09 [libnftnl PATCH] ruleset: fix erroneus call to snprintf Arturo Borrero Gonzalez
@ 2014-05-06 15:53 ` Arturo Borrero Gonzalez
  2014-05-07 13:39   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-06 15:53 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development Mailing list

On 6 May 2014 17:09, Arturo Borrero Gonzalez
<arturo.borrero.glez@gmail.com> wrote:
> This snprintf call is taking an erroneus value for size.
>

Please Pablo fix the message if you apply this. erroneus -> erroneous.

thanks, regards.

-- 
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [libnftnl PATCH] ruleset: fix erroneus call to snprintf
  2014-05-06 15:53 ` Arturo Borrero Gonzalez
@ 2014-05-07 13:39   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2014-05-07 13:39 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: Netfilter Development Mailing list

On Tue, May 06, 2014 at 05:53:01PM +0200, Arturo Borrero Gonzalez wrote:
> On 6 May 2014 17:09, Arturo Borrero Gonzalez
> <arturo.borrero.glez@gmail.com> wrote:
> > This snprintf call is taking an erroneus value for size.
> >
> 
> Please Pablo fix the message if you apply this. erroneus -> erroneous.

Fixed and applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-07 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 15:09 [libnftnl PATCH] ruleset: fix erroneus call to snprintf Arturo Borrero Gonzalez
2014-05-06 15:53 ` Arturo Borrero Gonzalez
2014-05-07 13:39   ` Pablo Neira Ayuso

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).