From b113ed6043622cdec68f3a70631b363594f3a8d0 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 17 Dec 2014 15:29:52 +0100 Subject: [PATCH] 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 Reviewed-by: Andreas Schneider --- source3/rpc_server/spoolss/srv_spoolss_nt.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.34.1