diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 15:08:41 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 15:08:41 +0000 |
commit | ebd4be96b56a3d4e04046b081170572db14b80a8 (patch) | |
tree | a0471ba87e28c7a14c9aa3764ba6485698313f27 | |
parent | 215f2a8cd001a0927cb5bbb0dd41bd37b8da20df (diff) | |
download | mandoc-ebd4be96b56a3d4e04046b081170572db14b80a8.tar.gz |
Fixed segfault in `Rs' empty block.
-rw-r--r-- | mdoc_action.c | 1 | ||||
-rw-r--r-- | mdoc_validate.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index 91457bc1..8df7a457 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -943,6 +943,7 @@ post_rs(POST_ARGS) if (MDOC_BLOCK != n->type) return(1); + assert(n->body->child); for (next = NULL, nn = n->body->child->next; nn; nn = next) { o = order_rs(nn->tok); diff --git a/mdoc_validate.c b/mdoc_validate.c index abc32752..83add494 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -126,7 +126,7 @@ static v_post posts_nd[] = { berr_ge1, NULL }; static v_post posts_nm[] = { post_nm, NULL }; static v_post posts_notext[] = { eerr_eq0, NULL }; static v_post posts_pf[] = { eerr_eq1, NULL }; -static v_post posts_rs[] = { bwarn_ge1, herr_eq0, post_rs, NULL }; +static v_post posts_rs[] = { berr_ge1, herr_eq0, post_rs, NULL }; static v_post posts_sh[] = { herr_ge1, bwarn_ge1, post_sh, NULL }; static v_post posts_sp[] = { post_sp, NULL }; static v_post posts_ss[] = { herr_ge1, NULL }; |