From dd73c9cfdc1d81a6b2a64d654616ef955be79a3d Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 18 Sep 2009 22:37:06 +0000 Subject: sync to 1.9.2: non-printable characters in macro names are errors; from joerg at netbsd dot org --- usr.bin/mandoc/mdoc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.bin/mandoc/mdoc.c') diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c index 803e8143aaf..da3983aca93 100644 --- a/usr.bin/mandoc/mdoc.c +++ b/usr.bin/mandoc/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.25 2009/08/22 21:55:06 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.26 2009/09/18 22:37:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -705,6 +705,12 @@ parsemacro(struct mdoc *m, int ln, char *buf) break; else if (' ' == buf[i]) break; + + /* Check for invalid characters. */ + + if (isgraph((u_char)buf[i])) + continue; + return(mdoc_perr(m, ln, i, EPRINT)); } mac[j] = 0; -- cgit v1.2.3