summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 13:01:35 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 13:01:35 +0000
commit9d70ad9e783183f60b7bf9ded3496003a1298237 (patch)
tree1dc5ebfe8de57a2977ebc84035790a28ba326aed
parent693ec82b8e663fa43e54751b5157c5612d843092 (diff)
downloadmandoc-9d70ad9e783183f60b7bf9ded3496003a1298237.tar.gz
mandoc-9d70ad9e783183f60b7bf9ded3496003a1298237.tar.zst
mandoc-9d70ad9e783183f60b7bf9ded3496003a1298237.zip
Memory-corruption fix.
-rw-r--r--action.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/action.c b/action.c
index 62031368..531a27c2 100644
--- a/action.c
+++ b/action.c
@@ -1,4 +1,4 @@
-/* $Id: action.c,v 1.34 2009/03/08 12:40:27 kristaps Exp $ */
+/* $Id: action.c,v 1.35 2009/03/08 13:01:35 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -241,10 +241,8 @@ post_ex(struct mdoc *mdoc)
mdoc_argnames[MDOC_Std],
mdoc->meta.name);
- assert(1 == mdoc->last->args->argv[0].sz);
-
- mdoc->last->args->argv[0].sz = 1;
mdoc->last->args->argv[0].value = xcalloc(1, sizeof(char *));
+ mdoc->last->args->argv[0].sz = 1;
mdoc->last->args->argv[0].value[0] = xstrdup(mdoc->meta.name);
return(1);
}