]> git.ipfire.org Git - thirdparty/bind9.git/commit
Detect UTF-16 surrogates in `isc_utf8_valid()`
authorColin Vidal <colin@isc.org>
Thu, 2 Jul 2026 07:52:09 +0000 (09:52 +0200)
committerColin Vidal <colin@isc.org>
Wed, 8 Jul 2026 08:31:10 +0000 (10:31 +0200)
commitad5e8fee8d8d24b5ef162ae689a98f71d45c228d
tree7e0e75a103c1f355b351bd59ef001e7e4b1d8c84
parent094efe68e35e885953eb0e682750ebeef26aaee5
Detect UTF-16 surrogates in `isc_utf8_valid()`

UTF-8 standard forbid usage of unicode character between the range of
0xD800..0xDFFF (reserved, and used as UTF-16 surrogates, see RFC 3629).

However, `usc_utf8_valid()` was not checking if the encoded unicode
character was in this range, which then would accept invalid UTF-8
strings. This is now fixed.
lib/isc/utf8.c