summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-09-10 08:37:53 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-09-10 08:37:53 +0000
commit4f03000e7d4213f9fc881f2fe291ef7df6901539 (patch)
tree0cf15660f50191e6e55f8ab776a80e4a2b24ac9f /usr.sbin/bgpd
parent5f56f362c4fc931f059447e9338831cda26159eb (diff)
Use reallocarray() instead of recallocarray(), this code does not need the
extra security measures of recallocarray() which adds a lot of overhead. OK tb@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rtr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rtr.c b/usr.sbin/bgpd/rtr.c
index 4ea5aa931dd..94bed64ea7d 100644
--- a/usr.sbin/bgpd/rtr.c
+++ b/usr.sbin/bgpd/rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtr.c,v 1.22 2024/08/12 09:04:23 claudio Exp $ */
+/* $OpenBSD: rtr.c,v 1.23 2024/09/10 08:37:52 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@@ -143,7 +143,7 @@ aspa_set_entry(struct aspa_set *aspa, uint32_t asnum)
}
num = aspa->num + 1;
- newtas = recallocarray(aspa->tas, aspa->num, num, sizeof(uint32_t));
+ newtas = reallocarray(aspa->tas, num, sizeof(uint32_t));
if (newtas == NULL)
fatal("aspa_set merge");