musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/multibyte/internal.c
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 /src/multibyte/internal.c
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.
Diffstat (limited to 'src/multibyte/internal.c')
-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 ) \
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月13日 14:50:28 +0000

AltStyle によって変換されたページ (->オリジナル) /