diff options
author | 2014-12-19 04:58:35 +0000 | |
---|---|---|
committer | 2014-12-19 04:58:35 +0000 | |
commit | 3e2c5875ed63b44494405e85c9aa899ca0b2c53e (patch) | |
tree | 82cb686feae71c826eb445272d09b27f82693eb2 /mdoc_hash.c | |
parent | b30c3c3ead7f853efa6119905f0f545a0895b1d7 (diff) | |
download | mandoc-3e2c5875ed63b44494405e85c9aa899ca0b2c53e.tar.gz mandoc-3e2c5875ed63b44494405e85c9aa899ca0b2c53e.tar.zst mandoc-3e2c5875ed63b44494405e85c9aa899ca0b2c53e.zip |
Rewrite the low-level UTF-8 parser from scratch.
It accepted invalid byte sequences like 0xc080-c1bf, 0xe08080-e09fbf,
0xeda080-edbfbf, and 0xf0808080-f08fbfbf, produced valid roff Unicode
escape sequences from them, and the algorithm contained strong
defenses against any attempt to fix it.
This cures an assertion failure in the terminal formatter caused
by sneaking in ASCII 0x08 (backspace) by "encoding" it as an (invalid)
multibyte UTF-8 sequence, found by jsg@ with afl.
As a bonus, the new algorithm also reduces the code in the function
by about 20%.
Diffstat (limited to 'mdoc_hash.c')
0 files changed, 0 insertions, 0 deletions