]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device-monitor: actually refuse to send invalid devices 24288/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Aug 2022 19:19:27 +0000 (04:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 Aug 2022 19:34:19 +0000 (04:34 +0900)
Fixes an issue introduced by 9e79123884a36ce095b98d1c0fe247dddf02dbec.

src/libsystemd/sd-device/device-monitor.c

index 47a5d85886af36042e3069c378626a7ee1e26c2b..c179c116bb62d86af644446d40c28c21a6c2dec7 100644 (file)
@@ -578,8 +578,8 @@ int device_monitor_send_device(
         if (r < 0)
                 return log_device_debug_errno(device, r, "sd-device-monitor: Failed to get device properties: %m");
         if (blen < 32)
-                log_device_debug_errno(device, SYNTHETIC_ERRNO(EINVAL),
-                                       "sd-device-monitor: Length of device property nulstr is too small to contain valid device information");
+                return log_device_debug_errno(device, SYNTHETIC_ERRNO(EINVAL),
+                                              "sd-device-monitor: Length of device property nulstr is too small to contain valid device information");
 
         /* fill in versioned header */
         r = sd_device_get_subsystem(device, &val);