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