=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -p -r1.33 -r1.34 --- mandoc/man_term.c 2009/10/04 15:24:54 1.33 +++ mandoc/man_term.c 2009/10/07 12:19:39 1.34 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.33 2009/10/04 15:24:54 kristaps Exp $ */ +/* $Id: man_term.c,v 1.34 2009/10/07 12:19:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -919,15 +919,12 @@ static void print_foot(struct termp *p, const struct man_meta *meta) { struct tm *tm; - char *buf; + char buf[BUFSIZ]; - if (NULL == (buf = malloc(p->rmargin))) - err(EXIT_FAILURE, "malloc"); - tm = localtime(&meta->date); if (0 == strftime(buf, p->rmargin, "%B %d, %Y", tm)) - err(EXIT_FAILURE, "strftime"); + (void)strlcpy(buf, "(invalid date)", BUFSIZ); term_vspace(p); @@ -948,8 +945,6 @@ print_foot(struct termp *p, const struct man_meta *met term_word(p, buf); term_flushln(p); - - free(buf); }