diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-22 08:56:16 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-22 08:56:16 +0000 |
commit | de2f1180552ba0141ccf20dd2a4665ee6a724d7e (patch) | |
tree | d48e2ed5490a5787512415cbb95960db91621fe0 /mdoc.c | |
parent | 422eea354d16149a590fff2c9822f4dbde0e4bfa (diff) | |
download | mandoc-de2f1180552ba0141ccf20dd2a4665ee6a724d7e.tar.gz |
Added check for graphable characters in initial-line parse for libman and libmdoc (joerg@netbsd.org).
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |