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 a6213abb; for ; Mon, 15 Dec 2014 18:43:26 -0500 (EST) Date: Mon, 15 Dec 2014 18:43:26 -0500 (EST) Message-Id: <12976930732377167218.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: Empty conditions count as false. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Empty conditions count as false. When negated, they still count as false. Found when investigating crashes jsg@ found with afl. Not completely fixing the crashes yet. Modified Files: -------------- mdocml: roff.c Revision Data ------------- Index: roff.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/roff.c,v retrieving revision 1.239 retrieving revision 1.240 diff -Lroff.c -Lroff.c -u -p -r1.239 -r1.240 --- roff.c +++ roff.c @@ -1258,6 +1258,8 @@ roff_evalcond(struct roff *r, int ln, co wanttrue = 1; switch (v[*pos]) { + case '\0': + return(0); case 'n': /* FALLTHROUGH */ case 'o': -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv