From 7341ee2dfd0c183d7c3878f511cebcd57003c173 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 23 Sep 2007 21:54:03 +0000 Subject: [PATCH] Fixed a crash bug in get_local_name() when the file list is empty. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 9f2e2a9f..a9118ed3 100644 --- a/main.c +++ b/main.c @@ -582,7 +582,8 @@ static char *get_local_name(struct file_list *flist, char *dest_path) exit_cleanup(RERR_FILEIO); } - if (strcmp(flist->files[0]->basename, ".") == 0) + if (flist->high >= flist->low + && strcmp(flist->files[flist->low]->basename, ".") == 0) flist->files[0]->flags |= FLAG_DIR_CREATED; if (verbose) -- 2.34.1