summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-18 21:36:40 +0100
committerGünther Deschner <gd@samba.org>2009-03-18 21:56:38 +0100
commit43182fdff89bc5c238e7a90cf93500cef850ecd5 (patch)
treec1ec2af696162724f30941e55e9ce830719d2b89 /source3/rpc_server/srv_spoolss_nt.c
parent7a85a87edf3a589235b932a3c802278e78da4ec5 (diff)
downloadsamba-43182fdff89bc5c238e7a90cf93500cef850ecd5.tar.gz
samba-43182fdff89bc5c238e7a90cf93500cef850ecd5.tar.xz
samba-43182fdff89bc5c238e7a90cf93500cef850ecd5.zip
s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.
When a windows clients queries the "" key, we need to make sure to return with the appropriate error (WERR_INVALID_PARAM in that case), and not fall through to the buffer size handling macros. Found by torture test. Guenther
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 0b9598840bd..5e1c53905a0 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9141,6 +9141,10 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
free_a_printer(&printer, 2);
}
+ if (!W_ERROR_IS_OK(result)) {
+ return result;
+ }
+
*r->out.needed = SPOOLSS_BUFFER_ARRAY(p->mem_ctx,
spoolss_EnumPrinterDataEx, NULL,
*r->out.info,