[PATCH] test: fix 32 bit overflow in pcapng test

Thomas Monjalon thomas at monjalon.net
Mon Jul 29 18:33:11 CEST 2024


18/07/2024 21:07, Luca Boccassi:
> On Thu, 18 Jul 2024 at 18:43, Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> >
> > The conversion from seconds to nanoseconds in the pcapng test
> > would overflow on 32 bit platforms leading to this test failing.
> >
> > Reported-by: Luca Boccassi <bluca at debian.org>
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> > ---
> > -       ns = h->ts.tv_sec * NS_PER_S + h->ts.tv_usec;
> > +       ns = (uint64_t)h->ts.tv_sec * NS_PER_S + h->ts.tv_usec;
> 
> Thanks this fixes the issue, the build is now green
> 
> Tested-by: Luca Boccassi <bluca at debian.org>

Applied, thanks.




More information about the dev mailing list