From: Volker Lendecke Date: Sat, 6 Mar 2021 14:49:46 +0000 (+0100) Subject: lib: Protect "messaging_dgm_init()" from NULL dirs X-Git-Tag: tevent-0.11.0~1621 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da906fbc87fce50a21a65d3e5bcc1ccd7ab3323e;p=thirdparty%2Fsamba.git lib: Protect "messaging_dgm_init()" from NULL dirs Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- 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;