pch = strchr(token, '/');
if (pch != NULL) {
- strlcpy(ip_str, token, RTE_MIN((unsigned int long)(pch - token),
- sizeof(ip_str)));
+ strlcpy(ip_str, token,
+ RTE_MIN((unsigned int long)(pch - token + 1),
+ sizeof(ip_str)));
pch += 1;
if (is_str_num(pch) != 0)
return -EINVAL;
if (mask)
*mask = 0;
}
-
if (strlen(ip_str) >= INET_ADDRSTRLEN)
return -EINVAL;
pch = strchr(token, '/');
if (pch != NULL) {
- strlcpy(ip_str, token, RTE_MIN((unsigned int long)(pch - token),
+ strlcpy(ip_str, token,
+ RTE_MIN((unsigned int long)(pch - token + 1),
sizeof(ip_str)));
pch += 1;
if (is_str_num(pch) != 0)