summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-23 21:31:38 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-23 21:31:38 +0000
commita53f7e01114b79a3fd013a16e0d8ebb0787952d1 (patch)
tree9e5b04b286a6d4f12001dcf8c8efa5ee0fb0a20e /mandocdb.c
parent6df81a7c8c123abfcc1600e6c02c1210849704f8 (diff)
downloadmandoc-a53f7e01114b79a3fd013a16e0d8ebb0787952d1.tar.gz
Audit malloc(3)/calloc(3)/realloc(3) in VERSION_1_12.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 7f88c1a2..8b297e29 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -984,8 +984,8 @@ index_prune(const struct of *ofile, struct mdb *mdb, struct recs *recs)
cont:
if (recs->cur >= recs->size) {
recs->size += MANDOC_SLOP;
- recs->stack = mandoc_realloc(recs->stack,
- recs->size * sizeof(recno_t));
+ recs->stack = mandoc_reallocarray(recs->stack,
+ recs->size, sizeof(recno_t));
}
recs->stack[(int)recs->cur] = recs->last;