From 771b2724c0f9591e8f4dd7463c15bf0c957737dc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Nov 2014 03:20:51 +0100 Subject: sd-bus: deal with whitespace in matches --- src/libsystemd/sd-bus/bus-match.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3-54-g00ecf