On Mon, Oct 26, 2015 at 01:33:11PM +0100, Tobias Klauser wrote:
> On 2015-10-24 at 16:38:09 +0200, Vadim Kochan <[email protected]> wrote:
> > From: Vadim Kochan <[email protected]>
> > 
> > Add missing reset for src hostname buffer.
> > 
> > Signed-off-by: Vadim Kochan <[email protected]>
> > ---
> >  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 ?

Regards,

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to