[BusyBox-cvs] busybox/coreutils env.c,1.8,1.9

Erik Andersen andersen at busybox.net
Mon Nov 3 22:46:17 UTC 2003


Update of /var/cvs/busybox/coreutils
In directory winder:/tmp/cvs-serv22160/coreutils

Modified Files:
	env.c 
Log Message:
Set unset_env pointing to a NULL item, to prevent us from walking
off the end of the list and segfaulting.
 -Erik


Index: env.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/env.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- env.c	28 Jul 2003 07:42:19 -0000	1.8
+++ env.c	3 Nov 2003 22:46:14 -0000	1.9
@@ -62,9 +62,13 @@
 	char **ep, *p;
 	char *cleanenv[1] = { NULL };
 	unsigned long opt;
-	llist_t *unset_env;
+	llist_t list, *unset_env;
 	extern char **environ;
 
+	list.data = NULL;
+	list.link = NULL;
+	unset_env = &list;
+
 	bb_opt_complementaly = "u*";
 	bb_applet_long_options = env_long_options;
 




More information about the busybox-cvs mailing list