From: Vincent Bernat Date: Mon, 29 Jul 2019 13:42:30 +0000 (+0200) Subject: RPKI: Fix allocation of hostname when using an IPv6 address X-Git-Tag: v2.0.5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b62417c356796a35229ce07238abf98fb569ccb;p=thirdparty%2Fbird.git RPKI: Fix allocation of hostname when using an IPv6 address --- diff --git a/proto/rpki/config.Y b/proto/rpki/config.Y index a88a29a1c..63c7105cd 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; }