[PATCH] RPKI: fix allocation of hostname when using an IPv6 address
--- proto/rpki/config.Y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/rpki/config.Y b/proto/rpki/config.Y index a88a29a1c004..63c7105cd073 100644 --- a/proto/rpki/config.Y +++ b/proto/rpki/config.Y @@ -97,7 +97,7 @@ rpki_cache_addr: rpki_check_unused_hostname(); RPKI_CFG->ip = $1; /* Ensure hostname is filled */ - char *hostname = cfg_allocz(sizeof(INET6_ADDRSTRLEN + 1)); + char *hostname = cfg_allocz(INET6_ADDRSTRLEN + 1); bsnprintf(hostname, INET6_ADDRSTRLEN+1, "%I", RPKI_CFG->ip); RPKI_CFG->hostname = hostname; } -- 2.22.0
Thanks, merged. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Vincent Bernat