mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
dhcp: use memdup_suffix0() instead of strndup()
This commit is contained in:
parent
d9adc8a863
commit
79cd22d6f3
@ -198,7 +198,7 @@ static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overlo
|
||||
if (memchr(option, 0, len - 1))
|
||||
return -EINVAL;
|
||||
|
||||
string = strndup((const char *) option, len);
|
||||
string = memdup_suffix0((const char *) option, len);
|
||||
if (!string)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user