diff options
-rw-r--r-- | man.c | 6 | ||||
-rw-r--r-- | mdoc.c | 6 |
2 files changed, 12 insertions, 0 deletions
@@ -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; @@ -709,6 +709,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; |