From: Günther Deschner Date: Sat, 6 Jun 2009 22:47:03 +0000 (+0200) Subject: s3-samr: fix _QueryDisplayInformation r->out.returned_size. X-Git-Tag: tdb-1.1.5~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93e797064753e815a3fe5e32fdea167b395b58d3;p=thirdparty%2Fsamba.git s3-samr: fix _QueryDisplayInformation r->out.returned_size. *r->out.returned_size needs to be 0 if nothing was enumerated. Found by RPC-SAMR torture test. Guenther --- diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 6e990a319fb..e2f65ae322f 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1603,7 +1603,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p, DEBUG(5, ("_samr_QueryDisplayInfo: %d\n", __LINE__)); *r->out.total_size = num_account * struct_size; - *r->out.returned_size = temp_size; + *r->out.returned_size = num_account ? temp_size : 0; return status; }