From 411c04f06fa26642c6bfc29fd70128e3f870a455 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 1 Aug 2007 22:18:46 +0000 Subject: [PATCH] If readdir() gives us an empty name, reject it. --- flist.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.34.1