summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-match.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-27 03:20:51 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-27 22:02:12 +0100
commit771b2724c0f9591e8f4dd7463c15bf0c957737dc (patch)
tree63a8f4e0391666113af8ec332f000b473924b982 /src/libsystemd/sd-bus/bus-match.c
parent7d31d92400bab9648016136da1b1e8c5cff1bfcf (diff)
sd-bus: deal with whitespace in matches
Diffstat (limited to 'src/libsystemd/sd-bus/bus-match.c')
-rw-r--r--src/libsystemd/sd-bus/bus-match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
index 5658c61ba7..0e92a85ef7 100644
--- a/src/libsystemd/sd-bus/bus-match.c
+++ b/src/libsystemd/sd-bus/bus-match.c
@@ -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;