From 4569d232fe6387ebaffede22a904a733d699030f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 22 Aug 2009 08:56:16 +0000 Subject: Added check for graphable characters in initial-line parse for libman and libmdoc (joerg@netbsd.org). --- man.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'man.c') diff --git a/man.c b/man.c index 8fcb8ef9..c503a937 100644 --- a/man.c +++ b/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.37 2009/08/21 13:45:33 kristaps Exp $ */ +/* $Id: man.c,v 1.38 2009/08/22 08:56:16 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -493,6 +493,12 @@ man_pmacro(struct man *m, int ln, char *buf) break; else if (' ' == buf[i]) break; + + /* Check for invalid characters. */ + + if (isgraph((u_char)buf[i])) + continue; + return(man_perr(m, ln, i, WNPRINT)); } mac[j] = 0; -- cgit v1.2.3-56-ge451