mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
dhcp6: relax data assert in dhcp6_option_parse_string
dhcp6_option_parse_string is intended to clear strings with length 0,
for consistency. The data assert is too strict for this purpose, so we
will allow data || data_len == 0, similar to other dhcp6_option_parse*
helpers.
Fixes: fde788601b ("dhcp6-client: parse RFC8910 captive portal dhcp6 option")
This commit is contained in:
@@ -529,7 +529,7 @@ int dhcp6_option_parse_string(const uint8_t *data, size_t data_len, char **ret)
|
||||
_cleanup_free_ char *string = NULL;
|
||||
int r;
|
||||
|
||||
assert(data);
|
||||
assert(data || data_len == 0);
|
||||
assert(ret);
|
||||
|
||||
if (data_len <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user