Skip to content
Snippets Groups Projects
Commit 3b62417c authored by Vincent Bernat's avatar Vincent Bernat Committed by Ondřej Zajíček
Browse files

RPKI: Fix allocation of hostname when using an IPv6 address

parent 00284f0e
Branches
Tags
No related merge requests found
Pipeline #50681 passed with warnings with stages
in 5 minutes and 19 seconds
......@@ -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;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment