Page MenuHomeFreeBSD

D3399.id8007.diff
No OneTemporary

D3399.id8007.diff

Index: lib/libc/locale/utf8.c
===================================================================
--- lib/libc/locale/utf8.c
+++ lib/libc/locale/utf8.c
@@ -191,7 +191,7 @@
errno = EILSEQ;
return ((size_t)-1);
}
- if (wch >= 0xd800 && wch <= 0xdfff) {
+ if ((wch >= 0xd800 && wch <= 0xdfff) || wch > 0x10ffff) {
/*
* Malformed input; invalid code points.
*/
@@ -318,6 +318,10 @@
lead = 0xc0;
len = 2;
} else if ((wc & ~0xffff) == 0) {
+ if (wc >= 0xd800 && wc <= 0xdfff) {
+ errno = EILSEQ;
+ return ((size_t)-1);
+ }
lead = 0xe0;
len = 3;
} else if (wc >= 0 && wc <= 0x10ffff) {

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 29, 4:54 AM (1 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32324654
Default Alt Text
D3399.id8007.diff (620 B)

Event Timeline