bug in coreutils/printenv.c
Denis Vlasenko
vda.linux at googlemail.com
Mon Aug 6 02:46:09 UTC 2007
On Friday 03 August 2007 17:44, kalyanatejaswi balabhadrapatruni wrote:
> Hi all,
> "printenv" command prints argv[1] and exits, doesnt
> run through rest of the elements of argv[].
> ---------------
> Example:
> #busybox printenv SHELL PWD
> /bin/sh
> #
> Doesnt print PWD
> ----------------
>
> No great deal, small patch attached.
I am replacing open-coded environ[] scan there with getenv:
+ while ((arg = *++argv) != NULL) {
+ env = getenv(arg);
+ if (env)
+ puts(env);
+ }
Saves ~75 bytes too.
Please test svn, should be fixed now. Thanks.
--
vda
More information about the busybox
mailing list