mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-01-20 21:08:06 -05:00
Fixed a crash bug in get_local_name() when the file list is empty.
This commit is contained in:
3
main.c
3
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)
|
||||
|
||||
Reference in New Issue
Block a user