=================================================================== RCS file: /cvs/mandoc/man.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -p -r1.109 -r1.110 --- mandoc/man.c 2011/07/21 10:24:35 1.109 +++ mandoc/man.c 2011/07/27 12:43:02 1.110 @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.109 2011/07/21 10:24:35 kristaps Exp $ */ +/* $Id: man.c,v 1.110 2011/07/27 12:43:02 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -320,16 +320,9 @@ int man_word_alloc(struct man *m, int line, int pos, const char *word) { struct man_node *n; - size_t sv, len; - len = strlen(word); - n = man_node_alloc(m, line, pos, MAN_TEXT, MAN_MAX); - n->string = mandoc_malloc(len + 1); - sv = strlcpy(n->string, word, len + 1); - - /* Prohibit truncation. */ - assert(sv < len + 1); + n->string = mandoc_strdup(word); if ( ! man_node_append(m, n)) return(0);