mirror of
https://github.com/systemd/systemd.git
synced 2025-03-09 12:58:26 +03:00
sd-dhcp-client: client ID always has non-zero data
Follow-up for f04c991a2fbb3531c3b464ed8e6dd7543e521f7a. Fixes CID#1510978.
This commit is contained in:
parent
c093bfe0ad
commit
251ca88230
@ -346,7 +346,7 @@ int sd_dhcp_client_get_client_id(
|
||||
assert_return(client, -EINVAL);
|
||||
|
||||
if (client->client_id_len > 0) {
|
||||
if (client->client_id_len < offsetof(sd_dhcp_client_id, raw.data))
|
||||
if (client->client_id_len <= offsetof(sd_dhcp_client_id, raw.data))
|
||||
return -EINVAL;
|
||||
|
||||
if (ret_type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user