summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-09 17:57:33 +0900
committerLuca Boccassi <luca.boccassi@gmail.com>2023-05-09 14:41:55 +0100
commit251ca882302c57eff7acade3a72fc3cfe16eafac (patch)
tree026b97654fe6c185692e8742fc214ac033c76124
parentc093bfe0ad47bd441b5f66005d73b7b62af554a0 (diff)
downloadsystemd-251ca882302c57eff7acade3a72fc3cfe16eafac.tar.gz
sd-dhcp-client: client ID always has non-zero data
Follow-up for f04c991a2fbb3531c3b464ed8e6dd7543e521f7a. Fixes CID#1510978.
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 4bce35b3a4..e5a1fdcd54 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -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)