source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: If a line inside .Bl -column starts with a tab character and
@ 2016-08-28 16:15 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2016-08-28 16:15 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@.

Modified Files:
--------------
    mdocml:
        mdoc_argv.c

Revision Data
-------------
Index: mdoc_argv.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_argv.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -Lmdoc_argv.c -Lmdoc_argv.c -u -p -r1.108 -r1.109
--- mdoc_argv.c
+++ mdoc_argv.c
@@ -480,7 +480,7 @@ args(struct roff_man *mdoc, int line, in
 			 * 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;
--
 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:[~2016-08-28 16:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-28 16:15 mdocml: If a line inside .Bl -column starts with a tab character and 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).