systemd/0008-sd-bus-don-t-access-invalid-memory-if-a-signal-match.patch

28 lines
932 B
Diff
Raw Normal View History

From bbb6ff0216a7c081a2e63e01b1f121592b0165bb Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 14 Mar 2014 21:12:36 +0100
Subject: [PATCH] sd-bus: don't access invalid memory if a signal matcher was
freed from its own callback
---
src/libsystemd/sd-bus/bus-match.c | 3 +++
1 file changed, 3 insertions(+)
diff --git src/libsystemd/sd-bus/bus-match.c src/libsystemd/sd-bus/bus-match.c
index 8280488..c54ca8d 100644
--- src/libsystemd/sd-bus/bus-match.c
+++ src/libsystemd/sd-bus/bus-match.c
@@ -293,6 +293,9 @@ int bus_match_run(
r = bus_maybe_reply_error(m, r, &error_buffer);
if (r != 0)
return r;
+
+ if (bus && bus->match_callbacks_modified)
+ return 0;
}
return bus_match_run(bus, node->next, m);
--
1.7.9.2