aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-04-09 09:23:17 -0500
committerRob Landley <rob@landley.net>2014-04-09 09:23:17 -0500
commitbe07288043fbc4bd7a1a4688d0bf17af4b6e73d7 (patch)
tree453c40e373e209b0edf42000e83ac13518ae2f4a /toys
parent7eaf4f535da215cd7061d60fb691df2ba09fff8a (diff)
downloadtoybox-be07288043fbc4bd7a1a4688d0bf17af4b6e73d7.tar.gz
Bugfix: if $TERM and friends aren't set, putenv() got passed a NULL.
Diffstat (limited to 'toys')
-rw-r--r--toys/lsb/su.c2
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");