Coverity issue: 137854, 137855
Fixes:
0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
if (mask)
*mask = atoi(pch);
} else {
- strncpy(ip_str, token, sizeof(ip_str));
+ strncpy(ip_str, token, sizeof(ip_str) - 1);
if (mask)
*mask = 0;
}
if (mask)
*mask = atoi(pch);
} else {
- strncpy(ip_str, token, sizeof(ip_str));
+ strncpy(ip_str, token, sizeof(ip_str) - 1);
if (mask)
*mask = 0;
}