diff options
author | Rob Landley <rob@landley.net> | 2014-04-09 09:23:17 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-04-09 09:23:17 -0500 |
commit | be07288043fbc4bd7a1a4688d0bf17af4b6e73d7 (patch) | |
tree | 453c40e373e209b0edf42000e83ac13518ae2f4a | |
parent | 7eaf4f535da215cd7061d60fb691df2ba09fff8a (diff) | |
download | toybox-be07288043fbc4bd7a1a4688d0bf17af4b6e73d7.tar.gz |
Bugfix: if $TERM and friends aren't set, putenv() got passed a NULL.
-rw-r--r-- | toys/lsb/su.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/lsb/su.c b/toys/lsb/su.c index a92705c5..268ddf75 100644 --- a/toys/lsb/su.c +++ b/toys/lsb/su.c @@ -71,7 +71,7 @@ void su_main() snapshot_env("COLORTERM"), snapshot_env("XAUTHORITY")}; clearenv(); - for (i=0; i < sizeof(stuff)/sizeof(char *); i++) putenv(stuff[i]); + for (i=0; i < ARRAY_LEN(stuff); i++) if (stuff[i]) putenv(stuff[i]); *(argv++) = "-l"; xchdir(up->pw_dir); } else unsetenv("IFS"); |