1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00
Douglas Bagnall 3960eabca7 libutil/iconv: avoid overflow in surrogate pairs
Consider the non-conforment utf-8 sequence "\xf5\x80\x80\x80", which
would encode 0x140000. We would set the high byte of the first
surrogate to 0xd8 | (0x130000 >> 18), or 0xdc, which is an invalid
start for a high surrogate, making the sequence as a whole invalid (as
you would expect -- the Unicode range was set precisely to that
covered by utf-16 surrogates).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-26 01:24:32 +00:00
..
2023-04-14 05:25:33 +00:00
2023-04-14 05:25:33 +00:00
2023-10-26 01:24:32 +00:00
2023-09-11 02:42:41 +00:00
2021-01-12 00:10:30 +00:00
2021-01-12 01:19:26 +00:00