]> 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 10:57:11 +0000 (10:57 +0000)
commit9be924f907c5215d9452db1cb407c83f39df67a5
tree223680fe11ed9964eed85b630e76e5cfed4e1ee0
parenta55de23fb057d1bf431f20225529e2eadbbccfdf
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