diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-08 12:40:27 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-08 12:40:27 +0000 |
commit | 74e270cb031a950090a2f9a9c1a083e2c45ebb6a (patch) | |
tree | 9227d21db7c9d0ba4e9a907977f4ceb68a7f546f /validate.c | |
parent | ca7eb2795830f918afc855b2fdaabe093d8cee13 (diff) | |
download | mandoc-74e270cb031a950090a2f9a9c1a083e2c45ebb6a.tar.gz |
Memory fixes in new dynamic schema.
Diffstat (limited to 'validate.c')
-rw-r--r-- | validate.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -638,6 +638,7 @@ check_args(struct mdoc *m, const struct mdoc_node *n) if (NULL == n->args) return(1); + assert(n->args->argc); for (i = 0; i < (int)n->args->argc; i++) if ( ! check_argv(m, n, &n->args->argv[i])) return(0); @@ -684,8 +685,7 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) p += (int)c - 1; continue; } - return(mdoc_perr(mdoc, line, pos, - "invalid escape sequence: %s", p)); + return(mdoc_perr(mdoc, line, pos, "invalid escape")); } return(1); @@ -891,7 +891,7 @@ static int pre_an(PRE_ARGS) { - if (n->args && 1 >= n->args->argc) + if (NULL == n->args || 1 == n->args->argc) return(1); return(mdoc_nerr(mdoc, n, "only one argument allowed")); } |