Skip to content

Commit

Permalink
test setting invalid UTF-8 strings
Browse files Browse the repository at this point in the history
If the string buffer comes from an EBML file we should be able to copy the same
buffer without interpreting it, even if it's bogus. It may be intentional.

Fixes Matroska-Org#180
  • Loading branch information
robUx4 committed Dec 26, 2023
1 parent ffdd0fa commit 371f37f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_utfstring.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ int main(void)
if (utf8 != emoji_w)
return 1;

// UTFstring invalid;
// FIXME don't crash invalid.SetUTF8( "\x1\xF6\x00" );
UTFstring invalid;
invalid.SetUTF8( "\x1\xF6\x00" );

UTFstring empty{0};
if (empty.length() != 0)
Expand Down

0 comments on commit 371f37f

Please sign in to comment.