]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Protect "messaging_dgm_init()" from NULL dirs
authorVolker Lendecke <vl@samba.org>
Sat, 6 Mar 2021 14:49:46 +0000 (15:49 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 9 Mar 2021 22:36:28 +0000 (22:36 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/messaging/messages_dgm.c

index 99455729aca1b7ddafe157688d881997039ec104..733cd19d3b8d27a148d91ef8e5c9fa9f422ec213 100644 (file)
@@ -1002,6 +1002,10 @@ int messaging_dgm_init(struct tevent_context *ev,
                return EEXIST;
        }
 
+       if ((socket_dir == NULL) || (lockfile_dir == NULL)) {
+               return EINVAL;
+       }
+
        ctx = talloc_zero(NULL, struct messaging_dgm_context);
        if (ctx == NULL) {
                goto fail_nomem;