1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

ndr_spoolss_buf: fix out of scope use of stack variable in NDR_SPOOLSS_PUSH_ENUM_OUT()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13818

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Stefan Metzmacher 2019-03-01 15:48:18 +01:00 committed by Andrew Bartlett
parent c059b8cb82
commit 6da3664f8a

View File

@ -43,7 +43,8 @@
} while(0)
#define NDR_SPOOLSS_PUSH_ENUM_OUT(fn) do { \
struct ndr_push *_ndr_info;\
DATA_BLOB _data_blob_info = data_blob_null;\
struct ndr_push *_ndr_info = NULL;\
_r.in.level = r->in.level;\
_r.in.buffer = r->in.buffer;\
_r.in.offered = r->in.offered;\
@ -56,7 +57,6 @@
"SPOOLSS Buffer: *r->out.info but there's no r->in.buffer");\
}\
if (r->in.buffer) {\
DATA_BLOB _data_blob_info;\
_ndr_info = ndr_push_init_ctx(ndr);\
NDR_ERR_HAVE_NO_MEMORY(_ndr_info);\
_ndr_info->flags= ndr->flags;\