torture: talloc_string_sub tests for utf-8 brevity
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 16 Jun 2021 05:35:19 +0000 (17:35 +1200)
committerJeremy Allison <jra@samba.org>
Fri, 18 Jun 2021 03:39:28 +0000 (03:39 +0000)
commit50047588c0c8da2e1ffa0b08a8dc5d31e49f6a3b
tree367ef165e73bdad1b0a81af5541ce955a48791e0
parent1c3821c9f9ce93a7bcaeb26ccdacfba221223110
torture: talloc_string_sub tests for utf-8 brevity

If we allow overly long UTF-8 sequences (in the tests, encoding '\0'
as 2, 3, or 4 bytes), it might be possible for bad strings to slip
through.

We fail. But wait for the next commit.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/tests/str.c
selftest/knownfail.d/str-utf8 [new file with mode: 0644]