aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-05 21:29:42 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-05 21:29:42 +0000
commitdf5bbb938ae73cf668778d1d54718fddb0f76130 (patch)
tree5052edb7b289a828ce9bfef5e85d568503a5cee7 /coreutils
parent1bb552b1d9da749050274e0a9cb10b672db22d77 (diff)
downloadbusybox-df5bbb938ae73cf668778d1d54718fddb0f76130.tar.gz
diff: fix segfault on empty dirs (Peter Korsgaard <peter.korsgaard@barco.com>)
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 1903bb151..75557187c 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1070,7 +1070,7 @@ static int add_to_dirlist(const char *filename,
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