summaryrefslogtreecommitdiffstats
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-28 16:15:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-28 16:15:12 +0000
commit7b96be561b6468986e08aedac7c8aab7198f722c (patch)
tree74eaebbf1ec39ab846e5e44f3a6ccd418c304ebb /mdoc_argv.c
parent41f393601155f987e273b2a177289e9b3deaecea (diff)
downloadmandoc-7b96be561b6468986e08aedac7c8aab7198f722c.tar.gz
If a line inside .Bl -column starts with a tab character
and there was no preceding .It macro, do not read the byte before the beginning of the line buffer. Found by tb@ with afl@.
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 8366be39..258ada12 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -480,7 +480,7 @@ args(struct roff_man *mdoc, int line, int *pos,
* unless there is a blank in between.
*/
- if (p[-1] != ' ')
+ if (p > buf && p[-1] != ' ')
mdoc->flags |= MDOC_PHRASEQL;
if (p[1] != ' ')
mdoc->flags |= MDOC_PHRASEQN;