source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Empty conditions count as false.
@ 2014-12-15 23:43 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-15 23:43 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-15 23:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 23:43 mdocml: Empty conditions count as false schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).