Allowing this broke a round-trip decode-encode fuzz test. Credit to OSS-Fuzz.
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62742
(Comments are from an earlier commit by Douglas Bagnall <douglas.bagnall@catalyst.net.nz>)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 13 02:30:23 UTC 2023 on atb-devel-224
} ace_condition_int;
typedef [public] struct {
- [flag(STR_SIZE4|STR_NOTERM|STR_BYTESIZE)] string value;
+ /*
+ * Zeroes are not allowed in the binary format (which
+ * is otherwise UTF-16), and if we did let them
+ * through we would end up with a truncated string.
+ */
+ [flag(STR_SIZE4|STR_NOTERM|STR_BYTESIZE|STR_NO_EMBEDDED_NUL)] string value;
} ace_condition_unicode;
typedef [public] struct {