mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
fixes bug with missing \0 in xioparsenetwork
This commit is contained in:
parent
3d95d9d679
commit
b0adfb95ae
1 changed files with 1 additions and 0 deletions
|
@ -1700,6 +1700,7 @@ int xioparsenetwork(const char *rangename, int pf, struct xiorange *range) {
|
||||||
return STAT_NORETRY;
|
return STAT_NORETRY;
|
||||||
}
|
}
|
||||||
strncpy(addrname, rangename, maskname-rangename-1);
|
strncpy(addrname, rangename, maskname-rangename-1);
|
||||||
|
addrname[maskname-rangename-1] = '\0';
|
||||||
result =
|
result =
|
||||||
dalan(addrname, (char *)&range->netaddr.soa.sa_data, &addrlen,
|
dalan(addrname, (char *)&range->netaddr.soa.sa_data, &addrlen,
|
||||||
sizeof(range->netaddr)-(size_t)(&((struct sockaddr *)0)->sa_data)
|
sizeof(range->netaddr)-(size_t)(&((struct sockaddr *)0)->sa_data)
|
||||||
|
|
Loading…
Reference in a new issue