diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-23 21:31:38 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-23 21:31:38 +0000 |
commit | a53f7e01114b79a3fd013a16e0d8ebb0787952d1 (patch) | |
tree | 9e5b04b286a6d4f12001dcf8c8efa5ee0fb0a20e /mandocdb.c | |
parent | 6df81a7c8c123abfcc1600e6c02c1210849704f8 (diff) | |
download | mandoc-a53f7e01114b79a3fd013a16e0d8ebb0787952d1.tar.gz |
Audit malloc(3)/calloc(3)/realloc(3) in VERSION_1_12.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |