lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 11 Jun 2021 11:51:26 +0200
From:   Guillaume Nault <gnault@...hat.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] utils: bump max args number to 256 for batch
 files

On Thu, Jun 10, 2021 at 04:17:42PM -0700, Stephen Hemminger wrote:
> On Thu, 10 Jun 2021 09:58:57 +0200
> Guillaume Nault <gnault@...hat.com> wrote:
> > > diff --git a/include/utils.h b/include/utils.h
> > > index 187444d52b41..6c4c403fe6c2 100644
> > > --- a/include/utils.h
> > > +++ b/include/utils.h
> > > @@ -50,6 +50,9 @@ void incomplete_command(void) __attribute__((noreturn));
> > >  #define NEXT_ARG_FWD() do { argv++; argc--; } while(0)
> > >  #define PREV_ARG() do { argv--; argc++; } while(0)
> > >  
> > > +/* upper limit for batch mode */
> > > +#define MAX_ARGS 512
> > > +
> > >  #define TIME_UNITS_PER_SEC     1000000
> > >  #define NSEC_PER_USEC 1000
> > >  #define NSEC_PER_MSEC 1000000
> > > diff --git a/lib/utils.c b/lib/utils.c
> > > index 93ae0c55063a..0559923beced 100644
> > > --- a/lib/utils.c
> > > +++ b/lib/utils.c
> > > @@ -1714,10 +1714,10 @@ int do_batch(const char *name, bool force,
> > >  
> > >         cmdlineno = 0;
> > >         while (getcmdline(&line, &len, stdin) != -1) {
> > > -               char *largv[100];
> > > +               char *largv[MAX_ARGS];
> > >                 int largc;
> > >  
> > > -               largc = makeargs(line, largv, 100);
> > > +               largc = makeargs(line, largv, MAX_ARGS);
> > >                 if (!largc)
> > >                         continue;       /* blank line */
> > >  
> > >   
> > 
> > Is this a patch you're going to apply, or should I repost it formally?
> > 
> 
> Either way, you get credit

I've sent v2. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ