From: Wayne Davison Date: Wed, 1 Aug 2007 22:18:46 +0000 (+0000) Subject: If readdir() gives us an empty name, reject it. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/411c04f06fa26642c6bfc29fd70128e3f870a455 If readdir() gives us an empty name, reject it. --- diff --git a/flist.c b/flist.c index 87a15b10..aa5a7c33 100644 --- a/flist.c +++ b/flist.c @@ -1469,6 +1469,13 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len, full_fname(fbuf)); continue; } + if (dname[0] == '\0') { + io_error |= IOERR_GENERAL; + rprintf(FINFO, + "cannot send file with empty name in %s\n", + full_fname(fbuf)); + continue; + } send_file_name(f, flist, fbuf, NULL, flags, filter_level); }