1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 00:49:01 +00:00

Silence GCC warning about string truncation. Fixes #2186

This commit is contained in:
nnposter
2020-11-26 02:29:39 +00:00
parent c00f054d3c
commit d3ef26b229

View File

@@ -1609,8 +1609,8 @@ static struct dnet_collector_route_nfo *sysroutes_dnet_find_interfaces(struct dn
char destbuf[INET6_ADDRSTRLEN];
char gwbuf[INET6_ADDRSTRLEN];
strncpy(destbuf, inet_ntop_ez(&dcrn->routes[i].dest, sizeof(dcrn->routes[i].dest)), sizeof(destbuf));
strncpy(gwbuf, inet_ntop_ez(&dcrn->routes[i].gw, sizeof(dcrn->routes[i].gw)), sizeof(gwbuf));
Strncpy(destbuf, inet_ntop_ez(&dcrn->routes[i].dest, sizeof(dcrn->routes[i].dest)), sizeof(destbuf));
Strncpy(gwbuf, inet_ntop_ez(&dcrn->routes[i].gw, sizeof(dcrn->routes[i].gw)), sizeof(gwbuf));
/*
netutil_error("WARNING: Unable to find appropriate interface for system route to %s/%u gw %s",
destbuf, dcrn->routes[i].netmask_bits, gwbuf);