From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s66IbZar009288 for ; Sun, 6 Jul 2014 14:37:35 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s66IbZ0F030713; Sun, 6 Jul 2014 14:37:35 -0400 (EDT) Date: Sun, 6 Jul 2014 14:37:35 -0400 (EDT) Message-Id: <201407061837.s66IbZ0F030713@krisdoz.my.domain> 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: Fix handling of escape sequences taking numeric arguments. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix handling of escape sequences taking numeric arguments. * Repair detection of invalid delimiters. * Discard the invalid delimiter together with the invalid sequence. Note to self: In general, strchr("\0...", c) is a thoroughly bad idea. Modified Files: -------------- mdocml: mandoc.c Revision Data ------------- Index: mandoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v retrieving revision 1.81 retrieving revision 1.82 diff -Lmandoc.c -Lmandoc.c -u -p -r1.81 -r1.82 --- mandoc.c +++ mandoc.c @@ -200,8 +200,10 @@ mandoc_escape(const char **end, const ch case 'v': /* FALLTHROUGH */ case 'x': - if (strchr("\0 %&()*+-./0123456789:<=>", **start)) + if (strchr(" %&()*+-./0123456789:<=>", **start)) { + ++*end; return(ESCAPE_ERROR); + } gly = ESCAPE_IGNORE; term = **start; *start = ++*end; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv