summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-08-22 08:56:16 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-08-22 08:56:16 +0000
commitde2f1180552ba0141ccf20dd2a4665ee6a724d7e (patch)
treed48e2ed5490a5787512415cbb95960db91621fe0 /man.c
parent422eea354d16149a590fff2c9822f4dbde0e4bfa (diff)
downloadmandoc-de2f1180552ba0141ccf20dd2a4665ee6a724d7e.tar.gz
Added check for graphable characters in initial-line parse for libman and libmdoc (joerg@netbsd.org).
Diffstat (limited to 'man.c')
-rw-r--r--man.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/man.c b/man.c
index f2031616..b14f9897 100644
--- a/man.c
+++ b/man.c
@@ -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;