summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-09-01 17:05:40 -0400
committerRich Felker <dalias@aerifal.cx>2017-09-01 17:05:40 -0400
commit39db00afadc9d8d0456c46eab42b8cb8ff9f375c (patch)
treed3320be6f357bbd69e2edbe8ad6b106af0b99476
parent11ddc314b57196519316103b02acffe10299dad3 (diff)
downloadmusl-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.
-rw-r--r--src/multibyte/internal.c2
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 ) \