svn commit: trunk/busybox/coreutils

vda at busybox.net vda at busybox.net
Thu Apr 5 21:29:43 UTC 2007


Author: vda
Date: 2007-04-05 14:29:42 -0700 (Thu, 05 Apr 2007)
New Revision: 18343

Log:
diff: fix segfault on empty dirs (Peter Korsgaard <peter.korsgaard at barco.com>)


Modified:
   trunk/busybox/coreutils/diff.c


Changeset:
Modified: trunk/busybox/coreutils/diff.c
===================================================================
--- trunk/busybox/coreutils/diff.c	2007-04-05 21:25:15 UTC (rev 18342)
+++ trunk/busybox/coreutils/diff.c	2007-04-05 21:29:42 UTC (rev 18343)
@@ -1070,7 +1070,7 @@
 static char **get_dir(char *path)
 {
 	dl_count = 0;
-	dl = NULL;
+	dl = xzalloc(sizeof(dl[0]));
 
 	/* If -r has been set, then the recursive_action function will be
 	 * used. Unfortunately, this outputs the root directory along with




More information about the busybox-cvs mailing list