mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 22:28:01 +02:00
systemd: dhcp6: remove assertions in dhcp6_option_parse_domainname()
Assertions are for programming errors; here the input comes directly
from the DHCP response packet.
af710b535b
This commit is contained in:
parent
0107c1add3
commit
e2248143af
1 changed files with 4 additions and 2 deletions
|
|
@ -649,8 +649,10 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char *
|
|||
_cleanup_strv_free_ char **names = NULL;
|
||||
int r;
|
||||
|
||||
assert_return(optlen > 1, -ENODATA);
|
||||
assert_return(optval[optlen - 1] == '\0', -EINVAL);
|
||||
if (optlen <= 1)
|
||||
return -ENODATA;
|
||||
if (optval[optlen - 1] != '\0')
|
||||
return -EINVAL;
|
||||
|
||||
while (pos < optlen) {
|
||||
_cleanup_free_ char *ret = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue