Skip to content

Commit

Permalink
ndr_spoolss_buf: fix out of scope use of stack variable in NDR_SPOOLS…
Browse files Browse the repository at this point in the history
…S_PUSH_ENUM_OUT()

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

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: David Disseldorp <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
Reviewed-by: Björn Jacke <[email protected]>
Reviewed-by: Günther Deschner <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Garming Sam <[email protected]>
  • Loading branch information
metze-samba authored and abartlet committed Mar 6, 2019
1 parent c059b8c commit 6da3664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librpc/ndr/ndr_spoolss_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;\
Expand All @@ -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;\
Expand Down

0 comments on commit 6da3664

Please sign in to comment.