diff options
author | Pierre Ossman <ossman@cendio.se> | 2020-10-05 16:07:27 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-10-05 16:07:27 +0200 |
commit | 703eb4d13016090d1b50294faaf9b57c6ed9a738 (patch) | |
tree | 6728eff052741d895166cb9262f7f335f1895858 /tests | |
parent | d163da9ac89b2587401cd42e9a21309d1ba8fa3f (diff) | |
download | tigervnc-703eb4d13016090d1b50294faaf9b57c6ed9a738.tar.gz tigervnc-703eb4d13016090d1b50294faaf9b57c6ed9a738.zip |
Correctly handle invalid UTF-16 code points
Some code points are reserved for the UTF-16 coding itself and must not
appear as input data to the algorithm.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/unicode.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/unicode.cxx b/tests/unit/unicode.cxx index bb2525de..52548e00 100644 --- a/tests/unit/unicode.cxx +++ b/tests/unit/unicode.cxx @@ -59,6 +59,7 @@ struct _ucs4utf16 ucs4utf16[] = { { 0x2d006, L"\xd874\xdc06" }, { 0xfffd, L"\xdc40\xdc12" }, { 0x110200, L"\xfffd" }, + { 0xd87f, L"\xfffd" }, }; struct _latin1utf8 latin1utf8[] = { @@ -75,6 +76,7 @@ struct _utf8utf16 utf8utf16[] = { { "\xf0\x9f\x98\xb8\xf0\x9f\x99\x81\xf0\x9f\x99\x82", L"\xd83d\xde38\xd83d\xde41\xd83d\xde42" }, { "\xf0\xad\x80\x86\xf0\xad\x80\x88", L"\xd874\xdc06\xd874\xdc08" }, { "\xef\xbf\xbd\xc3\xa5", L"\xd840\xe5" }, + { "\xed\xa1\xbf", L"\xfffd" }, }; #define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a)) |