diff options
author | 2009-09-18 22:37:05 +0000 | |
---|---|---|
committer | 2009-09-18 22:37:05 +0000 | |
commit | ba51e784a9e093c6086c344d0b6138b3a3fb88f1 (patch) | |
tree | 6ed19a3b4a9d1657b21bfcfca33709a8522d9fe8 /usr.bin/mandoc/man.c | |
parent | Make sure we handle all possible ways regions can overlap when EX_CONFLICTOK (diff) | |
download | wireguard-openbsd-ba51e784a9e093c6086c344d0b6138b3a3fb88f1.tar.xz wireguard-openbsd-ba51e784a9e093c6086c344d0b6138b3a3fb88f1.zip |
sync to 1.9.2: non-printable characters in macro names are errors;
from joerg at netbsd dot org
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r-- | usr.bin/mandoc/man.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index 009a25ef413..ab25e160094 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.10 2009/08/22 23:17:39 schwarze Exp $ */ +/* $Id: man.c,v 1.11 2009/09/18 22:37:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -489,6 +489,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; |