mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Readd checking utf16 surrogates that are invalid in utf8
This commit is contained in:
parent
a6d2922cbb
commit
81eb7d7e4b
1 changed files with 7 additions and 0 deletions
|
|
@ -193,6 +193,13 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n,
|
|||
errno = EILSEQ;
|
||||
return ((size_t)-1);
|
||||
}
|
||||
if (wch >= 0xd800 && wch <= 0xdfff) {
|
||||
/*
|
||||
* Malformed input; invalid code points.
|
||||
*/
|
||||
errno = EILSEQ;
|
||||
return ((size_t)-1);
|
||||
}
|
||||
if (pwc != NULL)
|
||||
*pwc = wch;
|
||||
us->want = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue