| From bee26651fc3ca2fe6bed00cb0d9c91c429e9bb57 Mon Sep 17 00:00:00 2001 |
| From: Tom Gundersen <teg@jklm.no> |
| Date: Tue, 24 May 2016 01:34:29 +0200 |
| Subject: [PATCH] sd-device: udev-db - handle properties with empty value |
| (#3330) |
| |
| The statemachine was unable to parse properties with empty values, |
| reported in [0]. |
| |
| When reaching the start of the KEY, we would unconditionally read |
| one more character before starting to look for the end-of-line. |
| Simply look for the end-of-line from the first character. |
| |
| [0]: <https://bugzilla.redhat.com/show_bug.cgi?id=1338823> |
| --- |
| src/libsystemd/sd-device/sd-device.c | 1 - |
| 1 file changed, 1 deletion(-) |
| |
| diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c |
| index b1c3d5f228..2d7e482b46 100644 |
| --- a/src/libsystemd/sd-device/sd-device.c |
| +++ b/src/libsystemd/sd-device/sd-device.c |
| @@ -561,7 +561,6 @@ int device_read_uevent_file(sd_device *device) { |
| |
| state = VALUE; |
| |
| - break; |
| case VALUE: |
| if (strchr(NEWLINE, uevent[i])) { |
| uevent[i] = '\0'; |
| -- |
| 2.32.0.554.ge1b32706d8-goog |
| |