Commit 4d427cfb authored by marijnh's avatar marijnh
Browse files

Check for overlong sequences rejected too much

Ignore-this: 2668c60f65d62142c92a416de6f16645

A code point like #x0800, which exactly fits in 3 bytes, would be
rejected because a > was used where >= was needed.

parent 05353784
......@@ -141,7 +141,7 @@ extract the character starting at the given start position."
(test-overlong (byte min-size)
(let ((b (gensym)))
`(let ((,b ,byte))
(unless (> ,b ,min-size)
(unless (>= ,b ,min-size)
(error 'utf-8-decoding-error :byte ,b
:message "Overlong byte sequence found."))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment