From 5c95c5cc16aacccaad87ff52055e431d0f295f60 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Mon, 25 Jan 2021 18:56:17 +0100 Subject: [PATCH] netconfig: Set more correct buffer length Use INET_ADDRSTRLEN as the IPv4 address buffer size to avoid confusion. --- src/netconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netconfig.c b/src/netconfig.c index e7a6a402..cf092b78 100644 --- a/src/netconfig.c +++ b/src/netconfig.c @@ -608,7 +608,7 @@ static bool netconfig_ipv4_routes_install(struct netconfig *netconfig) L_AUTO_FREE_VAR(char *, gateway) = NULL; struct in_addr in_addr; char *network; - char ip[INET6_ADDRSTRLEN]; + char ip[INET_ADDRSTRLEN]; unsigned int prefix_len = l_rtnl_address_get_prefix_length(netconfig->v4_address);