diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-08-28 16:15:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-08-28 16:15:12 +0000 |
commit | 1cc34c3d5e9401c485dbb91124f6789f0101137d (patch) | |
tree | 550659a3e846c6c0b7d5d3f80ba32f6492e7e4e6 /mdoc_argv.c | |
parent | 7ff737e216d9a73815b24bc6c7c226f686817eed (diff) | |
download | mandoc-1cc34c3d5e9401c485dbb91124f6789f0101137d.tar.gz mandoc-1cc34c3d5e9401c485dbb91124f6789f0101137d.tar.zst mandoc-1cc34c3d5e9401c485dbb91124f6789f0101137d.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 41889934..b47c7dbd 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.108 2016/07/15 18:03:45 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.109 2016/08/28 16:15:12 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |