From: Kristaps Dzonsons Date: Sun, 8 Mar 2009 13:01:35 +0000 (+0000) Subject: Memory-corruption fix. X-Git-Tag: VERSION_1_4_2~10 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/9d70ad9e783183f60b7bf9ded3496003a1298237?ds=sidebyside Memory-corruption fix. --- 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 * @@ -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); }