[BusyBox 0000980]: patch to avoid "broadcast +" syntax
Rob Landley
rob at landley.net
Tue Nov 28 12:02:26 PST 2006
On Tuesday 28 November 2006 1:49 pm, Roberto A. Foglietta wrote:
> 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:
Assuming you don't mind stomping envp, sure.
Did you check your environment variable list to make sure that wasn't changed
by writing to argv[argc+1]? I believe the layout of this memory is
determined by the kernel when it does an exec, and that the initial
environment space starts right after the argument list. But maybe there's
some padding in there, I haven't looked...
And of course this is on Linux 2.6, haven't tried on older kernels or on MacOS
X...
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
More information about the busybox
mailing list