]> git.ipfire.org Git - thirdparty/samba.git/commit
libndr: add support for unions to ndr_pull_struct_blob_noalloc() and ndr_push_struct_...
authorRalph Boehme <slow@samba.org>
Fri, 11 Jul 2025 04:02:13 +0000 (06:02 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Aug 2025 14:52:34 +0000 (14:52 +0000)
commitde1b2b0d07ef32ff8b9ab4fbf2bec51b227256ec
tree667352431232c42a86b37d10b40e2a1a0e60936e
parent9b5b63870f7f0e0a5f89f14515529a9fdbfdb879
libndr: add support for unions to ndr_pull_struct_blob_noalloc() and ndr_push_struct_into_fixed_blob()

The union switch value is stored by ndr_token_store() which uses talloc to
manage ndr.switch_list. Preallocate a ndr_token array and ndr_token_list on the
stack of size ndr_token_list.fixed_alloc_count and optionally use that in
ndr_token_store().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
librpc/ndr/libndr.h
librpc/ndr/ndr.c