]> git.ipfire.org Git - thirdparty/samba.git/commit
s4:torture/ndr: demonstrate the ndr_push_string(STR_NOTERM|REMAINING) of "" is wrong
authorStefan Metzmacher <metze@samba.org>
Fri, 21 Jan 2022 00:09:23 +0000 (01:09 +0100)
committerJule Anger <janger@samba.org>
Sun, 30 Jan 2022 09:15:13 +0000 (09:15 +0000)
commit1d7e27ffa68013d4bdf879b25f3d3570d1873326
tree593e6c7b8309b98217a6a6177c5e6d74039e57d3
parent56ccaafb0322539d3e6cda40bc14aa9cad7a5884
s4:torture/ndr: demonstrate the ndr_push_string(STR_NOTERM|REMAINING) of "" is wrong

convert_string_talloc() never returns a string with len=0 and always
implies zero termination byte(s).

For ndr_push_string this is unexpected as we need to be compatible on
the wire and push 0 bytes for an empty string.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 8da26cb6725b5d853ab481a348a3a672966715b5)
selftest/knownfail.d/ndr_string [new file with mode: 0644]
source4/torture/ndr/string.c