summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-dhcp-lease.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-01-08 10:22:33 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-01-08 19:59:15 +0100
commitbdd2036e8141140f290769ce46a1276598450697 (patch)
tree2a76acaeae6ee3215a556c7fdd558e06c22e9dd9 /src/libsystemd-network/sd-dhcp-lease.c
parenttmpfiles: fix memory leak in arg_exclude_prefixes (diff)
downloadsystemd-bdd2036e8141140f290769ce46a1276598450697.tar.xz
systemd-bdd2036e8141140f290769ce46a1276598450697.zip
hexdecoct: make unbase64mem and unhexmem always use SIZE_MAX
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-lease.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-lease.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
index fd32fbb049..401e70823a 100644
--- a/src/libsystemd-network/sd-dhcp-lease.c
+++ b/src/libsystemd-network/sd-dhcp-lease.c
@@ -1479,7 +1479,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {
_cleanup_free_ void *data = NULL;
size_t data_size;
- r = unhexmem(client_id_hex, SIZE_MAX, &data, &data_size);
+ r = unhexmem(client_id_hex, &data, &data_size);
if (r < 0)
log_debug_errno(r, "Failed to parse client ID %s, ignoring: %m", client_id_hex);
@@ -1489,7 +1489,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {
}
if (vendor_specific_hex) {
- r = unhexmem(vendor_specific_hex, SIZE_MAX, &lease->vendor_specific, &lease->vendor_specific_len);
+ r = unhexmem(vendor_specific_hex, &lease->vendor_specific, &lease->vendor_specific_len);
if (r < 0)
log_debug_errno(r, "Failed to parse vendor specific data %s, ignoring: %m", vendor_specific_hex);
}
@@ -1501,7 +1501,7 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {
if (!options[i])
continue;
- r = unhexmem(options[i], SIZE_MAX, &data, &len);
+ r = unhexmem(options[i], &data, &len);
if (r < 0) {
log_debug_errno(r, "Failed to parse private DHCP option %s, ignoring: %m", options[i]);
continue;