]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: Fix blkid.conf parsing
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 12 Mar 2017 16:48:44 +0000 (17:48 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 13 Mar 2017 11:46:47 +0000 (12:46 +0100)
The SEND_UEVENT=yes|no line is not properly parsed, because the offset
jumps one byte too far behind the equal sign. Therefore, every
configuration that contains the line "SEND_UEVENT=yes" still does not
send an uevent.

The fix is simple: adjust the offset to be "12" instead of "13".

libblkid/src/config.c

index 1822f1c678bc6f8b4506914a659e241a8ec69a47..52f159d870668116e5066f62fa059f567f5cf564 100644 (file)
@@ -88,7 +88,7 @@ static int parse_next(FILE *fd, struct blkid_config *conf)
        } while (*s == '\0' || *s == '#');
 
        if (!strncmp(s, "SEND_UEVENT=", 12)) {
-               s += 13;
+               s += 12;
                if (*s && !strcasecmp(s, "yes"))
                        conf->uevent = TRUE;
                else if (*s)