]> git.ipfire.org Git - thirdparty/samba.git/commit
spoolss: clear JobInfo on GetJob error
authorDavid Disseldorp <ddiss@samba.org>
Thu, 4 Dec 2014 19:03:39 +0000 (20:03 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 15 Jan 2015 12:55:09 +0000 (13:55 +0100)
commit2141975a8039a6e85cf9b2a2a8aec3bcd3954e3e
tree0219ce564838bb8175235ed4a048f2ce8c2d53e7
parentf0040c6168f1cf35fbbc448946d27391acff22a4
spoolss: clear JobInfo on GetJob error

In handling a spoolss GetJob request, the _spoolss_GetJob() 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
api_spoolss_GetJob() will attempt to marshall @info, which in the case
of an @offered value of zero results in a marshalling error:

ndr_push_error(7): Bad subcontext (PUSH) content_size 64 is larger
than size_is(0)

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>
(cherry picked from commit 89869e090c56a3f83b451b437f9c3f40a231dd24)
source3/rpc_server/spoolss/srv_spoolss_nt.c