git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a85a87
)
s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.
author
Günther Deschner
<gd@samba.org>
Wed, 18 Mar 2009 20:36:40 +0000
(21:36 +0100)
committer
Günther Deschner
<gd@samba.org>
Wed, 18 Mar 2009 20:56:38 +0000
(21:56 +0100)
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
source3/rpc_server/srv_spoolss_nt.c
patch
|
blob
|
history
diff --git
a/source3/rpc_server/srv_spoolss_nt.c
b/source3/rpc_server/srv_spoolss_nt.c
index 0b9598840bd13a0c7339cbd299afcb4a66753b5e..5e1c53905a0a025d6e98c2ef43506e460b0a89f0 100644
(file)
--- 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,