From 0100bb0eb697105db7ef1473455a8b180ca43cb4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 1 Jun 2005 00:00:07 +0000 Subject: r7157: Ensure we abort a directory listing if we see the same name twice between packets. Jeremy. (This used to be commit f9063b383ed2c53841ac27691b6a593b80c20b12) --- source3/libsmb/clilist.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/libsmb/clilist.c') diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index a1434338c9..d9a6f4709d 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -313,6 +313,13 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, } p2 += interpret_long_filename(cli,info_level,p2,&finfo, &resume_key,&last_name_raw,&last_name_raw_len); + + if (!First && *mask && strcsequal(finfo.name, mask)) { + DEBUG(0,("Error: Looping in FIND_NEXT as name %s has already been seen?\n", + finfo.name)); + ff_eos = 1; + break; + } } if (ff_lastname > 0) { -- cgit