On Mon, Oct 26, 2015 at 03:20:59PM +0100, Tobias Klauser wrote: > On 2015-10-26 at 15:07:31 +0100, vkochan <vadi...@gmail.com> wrote: > > On Mon, Oct 26, 2015 at 01:33:11PM +0100, Tobias Klauser wrote: > > > On 2015-10-24 at 16:38:09 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > > > > From: Vadim Kochan <vadi...@gmail.com> > > > > > > > > Add missing reset for src hostname buffer. > > > > > > > > Signed-off-by: Vadim Kochan <vadi...@gmail.com> > > > > --- > > > > flowtop.c | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/flowtop.c b/flowtop.c > > > > index c58ae0a..6aa0a6e 100644 > > > > --- a/flowtop.c > > > > +++ b/flowtop.c > > > > @@ -723,7 +723,9 @@ static void flow_entry_get_extended_revdns(struct > > > > flow_entry *n, > > > > sizeof(n->rev_dns_src), NULL, 0, NI_NUMERICHOST); > > > > > > > > if (hent) { > > > > - memset(n->rev_dns_dst, 0, sizeof(n->rev_dns_dst)); > > > > + memset(SELFLD(dir, rev_dns_src, rev_dns_dst), > > > > + 0, sizeof(n->rev_dns_src)); > > > > + > > > > > > While the change is certainly correct, I think the memset() isn't really > > > necessary here. Wouldn't it be better to just use strlcpy here? > > > > I suppose you meant strncpy ? > > No, I meant strlcpy from str.c which is what we use in all netsniff-ng > tools (except mausezahn) for string copy.
OK, thanks, will do. -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to netsniff-ng+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.