summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-12 21:25:31 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-13 04:06:43 +0100
commit2c8d477a01cd154bbaab6c46a5ffeed3e55f1a6b (patch)
tree55f11fafb17fb2e16fa4cfc9dc295817dd0874c3 /src
parent5fba7bbfa47ef5c03a28000252d06ec82405d461 (diff)
bus: fix parsing of matches against empty strings
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-bus/bus-match.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-match.c b/src/libsystemd-bus/bus-match.c
index f7fca5f573..342819d9c0 100644
--- a/src/libsystemd-bus/bus-match.c
+++ b/src/libsystemd-bus/bus-match.c
@@ -755,6 +755,14 @@ int bus_match_parse(
escaped = false;
}
+ if (!value) {
+ value = strdup("");
+ if (!value) {
+ r = -ENOMEM;
+ goto fail;
+ }
+ }
+
if (t == BUS_MATCH_MESSAGE_TYPE) {
r = bus_message_type_from_string(value, &u);
if (r < 0)