]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: udev-db - handle properties with empty value (#3330)
authorTom Gundersen <teg@jklm.no>
Mon, 23 May 2016 23:34:29 +0000 (01:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 23 May 2016 23:34:29 +0000 (19:34 -0400)
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

index b1c3d5f228895605f540eb27acc767da1e490523..2d7e482b46d2b0d99412010c8331fe44dbde023f 100644 (file)
@@ -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';