diff options
author | Vincent Bernat <vincent@bernat.ch> | 2019-07-29 15:42:30 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-29 15:42:30 +0200 |
commit | 3b62417c356796a35229ce07238abf98fb569ccb (patch) | |
tree | ad702dd7d8431617d7018b0c9cb69a2fd0725758 /proto/rpki | |
parent | 00284f0ed67370c7c697adf20b08840482ea18ea (diff) |
RPKI: Fix allocation of hostname when using an IPv6 address
Diffstat (limited to 'proto/rpki')
-rw-r--r-- | proto/rpki/config.Y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/rpki/config.Y b/proto/rpki/config.Y index a88a29a1..63c7105c 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; } |