[systemd-commits] src/libsystemd

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Wed Dec 3 15:24:55 PST 2014


 src/libsystemd/sd-bus/sd-bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d2df88ffbac8858214adb9daaf7a93122fe26a50
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Thu Dec 4 00:23:27 2014 +0100

    sd-bus: avoid a null dereference

diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index ff01d60..ef0b151 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -3400,7 +3400,7 @@ _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) {
                 }
 
                 dash = strchr(n, '-');
-                if (streq(dash, "-user")) {
+                if (streq_ptr(dash, "-user")) {
                         *scope = "user";
                         return 0;
                 }



More information about the systemd-commits mailing list