Reject the escape sequences \[uD800] to \[uDFFF] in the parser.
authorschwarze <schwarze@openbsd.org>
Tue, 13 Oct 2015 23:30:42 +0000 (23:30 +0000)
committerschwarze <schwarze@openbsd.org>
Tue, 13 Oct 2015 23:30:42 +0000 (23:30 +0000)
commit136612f731496137b54d6ed411cabaf71efd113a
tree679aa8617142d07b29060ec8193f124733e040f9
parent16536faa3e455e5e447217a099a5d2d1c0fe7285
Reject the escape sequences \[uD800] to \[uDFFF] in the parser.
These surrogates are not valid Unicode codepoints,
so treat them just like any other undefined character escapes:
Warn about them and do not produce output.
Issue noticed while talking to stsp@, semarie@, and bentley@.
regress/usr.bin/mandoc/char/unicode/input.out_ascii
regress/usr.bin/mandoc/char/unicode/input.out_lint
regress/usr.bin/mandoc/char/unicode/input.out_utf8
usr.bin/mandoc/mandoc.c