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 5658c61..0e92a85 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;