diff options
author | Rich Felker <dalias@aerifal.cx> | 2017-09-01 17:05:40 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-09-01 17:05:40 -0400 |
commit | 39db00afadc9d8d0456c46eab42b8cb8ff9f375c (patch) | |
tree | d3320be6f357bbd69e2edbe8ad6b106af0b99476 /src/multibyte | |
parent | 11ddc314b57196519316103b02acffe10299dad3 (diff) | |
download | musl-39db00afadc9d8d0456c46eab42b8cb8ff9f375c.tar.gz |
fix erroneous acceptance of f4 9x xx xx code sequences by utf-8 decoder
the DFA table controlling accepted ranges for the f4 prefix used an
incorrect upper bound of 0xa0 where it should have been 0x90, allowing
such sequences to be accepted and decoded as non-Unicode-scalar values
0x110000 through 0x11ffff.
Diffstat (limited to 'src/multibyte')
-rw-r--r-- | src/multibyte/internal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multibyte/internal.c b/src/multibyte/internal.c index 7e1b1c03..2f5aaa91 100644 --- a/src/multibyte/internal.c +++ b/src/multibyte/internal.c @@ -9,7 +9,7 @@ | x ) #define F(x) ( ( x>=5 ? 0 : \ x==0 ? R(0x90,0xc0) : \ - x==4 ? R(0x80,0xa0) : \ + x==4 ? R(0x80,0x90) : \ R(0x80,0xc0) ) \ | ( R(0x80,0xc0) >> 6 ) \ | ( R(0x80,0xc0) >> 12 ) \ |