summaryrefslogtreecommitdiff
path: root/lib/messaging
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-03-06 15:49:46 +0100
committerJeremy Allison <jra@samba.org>2021-03-09 22:36:28 +0000
commitda906fbc87fce50a21a65d3e5bcc1ccd7ab3323e (patch)
tree89db7070e8a40bc8fcda5414e8db9ddda5b30779 /lib/messaging
parent559b4df143159d5effffd5de4be291b34bb8ed2a (diff)
downloadsamba-da906fbc87fce50a21a65d3e5bcc1ccd7ab3323e.tar.gz
lib: Protect "messaging_dgm_init()" from NULL dirs
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/messaging')
-rw-r--r--lib/messaging/messages_dgm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/messaging/messages_dgm.c b/lib/messaging/messages_dgm.c
index 99455729aca..733cd19d3b8 100644
--- a/lib/messaging/messages_dgm.c
+++ b/lib/messaging/messages_dgm.c
@@ -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;