summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2008-12-04 16:34:59 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2008-12-04 16:34:59 +0000
commitfb40e7adf35e6b21b0e64e170b71e1a4d2cf5351 (patch)
tree709633693c524f8f2a224e8031814f910d646925 /roff.c
parent7ea64ffd96cef95695a6c74dbf90f76d73fa961d (diff)
downloadmandoc-fb40e7adf35e6b21b0e64e170b71e1a4d2cf5351.tar.gz
Character-set validation fixes.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index b30add22..08d10ffb 100644
--- a/roff.c
+++ b/roff.c
@@ -971,12 +971,20 @@ roffdata(struct rofftree *tree, int space, char *buf)
{
int tok;
+ if (0 == *buf)
+ return(1);
+
if (-1 == (tok = rofftok_scan(buf))) {
roff_err(tree, buf, "invalid character sequence");
return(0);
- } else if (ROFFTok_MAX != tok)
+ } else if (ROFFTok_MAX != tok) {
+ if (ROFFTok_Null == tok) { /* FIXME */
+ buf += 2;
+ return(roffdata(tree, space, buf));
+ }
return((*tree->cb.rofftoken)
(tree->arg, space != 0, tok));
+ }
return((*tree->cb.roffdata)(tree->arg,
space != 0, tree->cur, buf));