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 96464b28 for ; Fri, 14 Jul 2017 11:29:09 -0500 (EST) Date: Fri, 14 Jul 2017 11:29:09 -0500 (EST) Message-Id: <3902658812007410191.enqueue@fantadrom.bsd.lv> X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Fix an assertion failure triggered by print_otag("sw+-l", NULL). X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix an assertion failure triggered by print_otag("sw+-l", NULL). Even though we skip the style when the argument is NULL, we must still consume the options. Not found with afl(1), but during manual testing of the previous patch... Modified Files: -------------- mandoc: html.c Revision Data ------------- Index: html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.c,v retrieving revision 1.217 retrieving revision 1.218 diff -Lhtml.c -Lhtml.c -u -p -r1.217 -r1.218 --- html.c +++ html.c @@ -624,8 +624,13 @@ print_otag(struct html *h, enum htmltag su = va_arg(ap, struct roffsu *); break; case 'w': - if ((arg2 = va_arg(ap, char *)) == NULL) + if ((arg2 = va_arg(ap, char *)) == NULL) { + if (*fmt == '+') + fmt++; + if (*fmt == '-') + fmt++; break; + } su = &mysu; a2width(arg2, su); if (*fmt == '+') { -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv