From: Ronan Pigott Date: Tue, 29 Oct 2024 03:33:35 +0000 (-0700) Subject: network: add missing else in dhcp_lease_load X-Git-Tag: v257-rc1~111^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f54f473b3663ac6e12d25cbbe7ca15f67742406b;p=thirdparty%2Fsystemd.git network: add missing else in dhcp_lease_load Fixes: 3fd6708cde0f (network: Serialize DNR servers) --- diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index 1c0cd6829b7..6b2d8106451 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -1551,7 +1551,8 @@ int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) { r = deserialize_dnr(&lease->dnr, dnr); if (r < 0) log_debug_errno(r, "Failed to deserialize DNR servers %s, ignoring: %m", dnr); - lease->n_dnr = r; + else + lease->n_dnr = r; } if (ntp) { diff --git a/test/fuzz/fuzz-dhcp-client/dnr_invalid b/test/fuzz/fuzz-dhcp-client/dnr_invalid new file mode 100644 index 00000000000..a988fba0460 Binary files /dev/null and b/test/fuzz/fuzz-dhcp-client/dnr_invalid differ