diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-15 23:43:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-15 23:43:26 +0000 |
commit | 52a3a69b975dd05a56837b3fc9f93cc8681d3282 (patch) | |
tree | e4d59e65ca298c5ced50ed4bae5d7b1ed0357e7f | |
parent | 2322452bdd1d16bdfd654fff960ed6ecec3cbada (diff) | |
download | mandoc-52a3a69b975dd05a56837b3fc9f93cc8681d3282.tar.gz |
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.
-rw-r--r-- | roff.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1258,6 +1258,8 @@ roff_evalcond(struct roff *r, int ln, const char *v, int *pos) wanttrue = 1; switch (v[*pos]) { + case '\0': + return(0); case 'n': /* FALLTHROUGH */ case 'o': |