From be07288043fbc4bd7a1a4688d0bf17af4b6e73d7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 9 Apr 2014 09:23:17 -0500 Subject: Bugfix: if $TERM and friends aren't set, putenv() got passed a NULL. --- toys/lsb/su.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- cgit v1.2.3