svn commit: samba r2593 - in branches/SAMBA_4_0/source/torture/raw: .

tridge at samba.org tridge at samba.org
Fri Sep 24 07:32:53 GMT 2004


Author: tridge
Date: 2004-09-24 07:32:52 +0000 (Fri, 24 Sep 2004)
New Revision: 2593

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/raw&rev=2593&nolog=1

Log:
don't crash if the server doesn't know that 0 count searches mean 1


Modified:
   branches/SAMBA_4_0/source/torture/raw/search.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/search.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/search.c	2004-09-24 07:28:50 UTC (rev 2592)
+++ branches/SAMBA_4_0/source/torture/raw/search.c	2004-09-24 07:32:52 UTC (rev 2593)
@@ -772,13 +772,17 @@
 				      &io, &result, multiple_search_callback);
 	CHECK_STATUS(status, NT_STATUS_OK);
 	CHECK_VALUE(result.count, 1);
-
+	
 	io2.generic.level = RAW_SEARCH_BOTH_DIRECTORY_INFO;
 	io2.t2fnext.in.handle = io.t2ffirst.out.handle;
 	io2.t2fnext.in.max_count = num_files/2 - 1;
 	io2.t2fnext.in.resume_key = 0;
 	io2.t2fnext.in.flags = 0;
-	io2.t2fnext.in.last_name = result.list[result.count-1].both_directory_info.name.s;
+	if (result.count == 0) {
+		io2.t2fnext.in.last_name = "";
+	} else {
+		io2.t2fnext.in.last_name = result.list[result.count-1].both_directory_info.name.s;
+	}
 
 	status = smb_raw_search_next(cli->tree, mem_ctx,
 				     &io2, &result, multiple_search_callback);



More information about the samba-cvs mailing list