From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 9e80dd85; for ; Tue, 13 Oct 2015 18:31:20 -0500 (EST) Date: Tue, 13 Oct 2015 18:31:20 -0500 (EST) Message-Id: <3286665879722723042.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Reject the escape sequences \[uD800] to \[uDFFF] in the parser. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- 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@. Modified Files: -------------- mdocml: mandoc.c Revision Data ------------- Index: mandoc.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mandoc.c,v retrieving revision 1.95 retrieving revision 1.96 diff -Lmandoc.c -Lmandoc.c -u -p -r1.95 -r1.96 --- mandoc.c +++ mandoc.c @@ -333,6 +333,9 @@ mandoc_escape(const char **end, const ch break; if (*sz == 6 && (*start)[1] == '0') break; + if (*sz == 5 && (*start)[1] == 'D' && + strchr("89ABCDEF", (*start)[2]) != NULL) + break; if ((int)strspn(*start + 1, "0123456789ABCDEFabcdef") + 1 == *sz) gly = ESCAPE_UNICODE; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv