We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ae9a98 commit fdf759eCopy full SHA for fdf759e
src/libsystemd-network/sd-dhcp6-client.c
@@ -276,7 +276,7 @@ int sd_dhcp6_client_duid_as_string(
276
int r;
277
278
assert_return(client, -EINVAL);
279
- assert_return(client->duid_len > 0, -ENODATA);
+ assert_return(client->duid_len > offsetof(struct duid, raw.data), -ENODATA);
280
assert_return(duid, -EINVAL);
281
282
v = duid_type_to_string(be16toh(client->duid.type));
@@ -290,7 +290,7 @@ int sd_dhcp6_client_duid_as_string(
290
return -ENOMEM;
291
}
292
293
- t = hexmem(&client->duid.raw.data, client->duid_len);
+ t = hexmem(client->duid.raw.data, client->duid_len - offsetof(struct duid, raw.data));
294
if (!t)
295
296
0 commit comments