diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 10:57:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 10:57:18 +0000 |
commit | c3a9e030fde932dc513f88c9a5e8d3909532d5f0 (patch) | |
tree | 5f834c7982621e8594a0de178a48eb7d5e9e3082 /usr.sbin/route6d | |
parent | 513cf9e188165c56e471ce80380b70391c1817ca (diff) |
obvious reallocarray(); ok doug
Diffstat (limited to 'usr.sbin/route6d')
-rw-r--r-- | usr.sbin/route6d/route6d.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index 78262a40aef..9b9f3ad8e0a 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route6d.c,v 1.62 2014/03/24 10:48:29 mpi Exp $ */ +/* $OpenBSD: route6d.c,v 1.63 2014/10/08 10:57:17 deraadt Exp $ */ /* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */ /* @@ -3402,8 +3402,7 @@ setindex2ifc(int idx, struct ifc *ifcp) while (nindex2ifc <= idx) nindex2ifc *= 2; if (n != nindex2ifc) { - p = (struct ifc **)realloc(index2ifc, - sizeof(*index2ifc) * nindex2ifc); + p = reallocarray(index2ifc, nindex2ifc, sizeof(*index2ifc)); if (p == NULL) { fatal("realloc"); /*NOTREACHED*/ |