=================================================================== RCS file: /cvs/mandoc/Attic/apropos_db.c,v retrieving revision 1.32.2.5 retrieving revision 1.32.2.6 diff -u -p -r1.32.2.5 -r1.32.2.6 --- mandoc/Attic/apropos_db.c 2014/03/23 12:04:54 1.32.2.5 +++ mandoc/Attic/apropos_db.c 2014/04/23 21:31:38 1.32.2.6 @@ -1,4 +1,4 @@ -/* $Id: apropos_db.c,v 1.32.2.5 2014/03/23 12:04:54 schwarze Exp $ */ +/* $Id: apropos_db.c,v 1.32.2.6 2014/04/23 21:31:38 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2014 Ingo Schwarze @@ -555,8 +555,8 @@ single_search(struct rectree *tree, const struct opts if (strcasecmp(opts->arch, r.arch)) continue; - tree->node = rs = mandoc_realloc - (rs, (tree->len + 1) * sizeof(struct res)); + tree->node = rs = mandoc_reallocarray(rs, + tree->len + 1, sizeof(struct res)); memcpy(&rs[tree->len], &r, sizeof(struct res)); memset(&r, 0, sizeof(struct res));