=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.222 retrieving revision 1.224 diff -u -p -r1.222 -r1.224 --- mandoc/term.c 2014/04/20 16:46:05 1.222 +++ mandoc/term.c 2014/07/06 18:51:13 1.224 @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.222 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: term.c,v 1.224 2014/07/06 18:51:13 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -444,7 +444,7 @@ term_word(struct termp *p, const char *word) word++; esc = mandoc_escape(&word, &seq, &sz); if (ESCAPE_ERROR == esc) - break; + continue; if (TERMENC_ASCII != p->enc) switch (esc) { @@ -522,7 +522,7 @@ adjbuf(struct termp *p, size_t sz) while (sz >= p->maxcols) p->maxcols <<= 2; - p->buf = mandoc_realloc(p->buf, sizeof(int) * p->maxcols); + p->buf = mandoc_reallocarray(p->buf, p->maxcols, sizeof(int)); } static void @@ -683,7 +683,7 @@ term_strlen(const struct termp *p, const char *cp) cp++; esc = mandoc_escape(&cp, &seq, &ssz); if (ESCAPE_ERROR == esc) - return(sz); + continue; if (TERMENC_ASCII != p->enc) switch (esc) {