summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2014-12-17 15:29:52 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-12-19 15:40:43 +0100
commitb113ed6043622cdec68f3a70631b363594f3a8d0 (patch)
tree303b143021604e5c58288215d58fa60d44815681
parentfb9ecb044ee986ab3496da6cbad162a224378475 (diff)
downloadsamba-b113ed6043622cdec68f3a70631b363594f3a8d0.tar.gz
spoolss: clear FormInfo on GetForm error
In handling a spoolss GetForm request, the handler may return an immediate error if one of the input parameters is invalid. If this is done without zeroing the pre-allocated @info pointer, then marshalling of the response will fail. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 9023ab672ff..9b898d0ab53 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -7853,6 +7853,7 @@ WERROR _spoolss_GetForm(struct pipes_struct *p,
/* that's an [in out] buffer */
if (!r->in.buffer && (r->in.offered != 0)) {
+ TALLOC_FREE(r->out.info);
return WERR_INVALID_PARAM;
}