From: Andrew Bartlett Date: Sun, 17 Nov 2019 06:32:50 +0000 (+1300) Subject: negoex: Set the switch_value before NDR_BUFFERS to prepare for new libndr behaviour X-Git-Tag: ldb-2.1.0~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a22a22e4a8a2efad86833d21958bc6abf57f74e7;p=thirdparty%2Fsamba.git negoex: Set the switch_value before NDR_BUFFERS to prepare for new libndr behaviour BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/librpc/ndr/ndr_negoex.c b/librpc/ndr/ndr_negoex.c index b5cb5bc8bcf..95adce5a7e3 100644 --- a/librpc/ndr/ndr_negoex.c +++ b/librpc/ndr/ndr_negoex.c @@ -439,6 +439,7 @@ enum ndr_err_code ndr_pull_negoex_MESSAGE(struct ndr_pull *ndr, int ndr_flags, s NDR_PULL_NEED_BYTES(ndr, r->message_length); ndr->data_size = ndr->offset + r->message_length; ndr->offset = saved_offset; + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type)); NDR_CHECK(ndr_pull_negoex_PAYLOAD(ndr, NDR_BUFFERS, &r->p)); ndr->offset = ndr->data_size; ndr->data_size = start_data_size;