chiark / gitweb /
sd-bus: deal with whitespace in matches
authorLennart Poettering <lennart@poettering.net>
Thu, 27 Nov 2014 02:20:51 +0000 (03:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 27 Nov 2014 21:02:12 +0000 (22:02 +0100)
src/libsystemd/sd-bus/bus-match.c

index 5658c61ba789fba1529c99112bb4be8159f90b69..0e92a85ef756fdaf177e8abdcf9c61394c5531dc 100644 (file)
@@ -748,6 +748,9 @@ int bus_match_parse(
                 bool escaped = false, quoted;
                 uint8_t u;
 
+                /* Avahi's match rules appear to include whitespace, skip over it */
+                p += strspn(p, " ");
+
                 eq = strchr(p, '=');
                 if (!eq)
                         return -EINVAL;