[BusyBox 0000980]: patch to avoid "broadcast +" syntax

Roberto A. Foglietta roberto.foglietta at gmail.com
Tue Nov 28 10:49:30 PST 2006


2006/11/28, Rob Landley <rob at landley.net>:
> On Tuesday 28 November 2006 3:15 am, Roberto A. Foglietta wrote:
> >  Sorry Rob but I was writing about randomness of
> >
> >  argv[argc+1] ?= NULL
>
> Wandering off the end of the array does indeed give random results.
> Segfaults, even.
>

Some people use argv[argc+1] and I am wondering if argv is a special
vector which is a static sized or segfaults just does not happen
because +1 is not enought to get out the boundaries:

http://www.pbxfreeware.org/app_backticks.c
static char *do_backticks(char *command, char *buf, size_t len)
{
 ...
                       argv[argc++] = mycmd;


 Cheers,
-- 
/roberto


More information about the busybox mailing list