]> git.ipfire.org Git - thirdparty/samba.git/commit
librpc/ndr: Add support for LIBNDR_FLAG_STR_NO_EMBEDDED_NUL
authorAndrew Bartlett <abartlet@samba.org>
Sun, 5 Nov 2023 22:11:14 +0000 (11:11 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 13 Nov 2023 01:28:36 +0000 (01:28 +0000)
commit4decb074d8feed66201057fd663e257cf45c65d6
treebe54f08e9de926a007d8ae94e83918eb2662edc5
parent2b4a17f54fee552717068377dfc15f9999474fde
librpc/ndr: Add support for LIBNDR_FLAG_STR_NO_EMBEDDED_NUL

This requires that, other than termination, no NUL (\0) codepoints
exist in the input string, because bytes beyon that will be lost
in the output string.

This in turn causes trouble for round-trip testing, so it is easiest
to reject it upfront (on an opt-in basis).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
librpc/idl/idl_types.h
librpc/ndr/libndr.h
librpc/ndr/ndr_string.c
librpc/tests/test_ndr_string.c