From: Volker Lendecke Date: Tue, 28 May 2019 06:49:52 +0000 (+0200) Subject: lib: Fix CID 1445648 Null pointer dereferences X-Git-Tag: ldb-2.0.5~608 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32999e148727ff3f0371a78dd80b7c3e6b666391;p=thirdparty%2Fsamba.git lib: Fix CID 1445648 Null pointer dereferences Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/lib/util/sys_popen.c b/lib/util/sys_popen.c index 659e99ba736..f62199b42ff 100644 --- a/lib/util/sys_popen.c +++ b/lib/util/sys_popen.c @@ -44,13 +44,14 @@ int sys_popenv(char * const argl[]) int parent_end, child_end; int pipe_fds[2]; popen_list *entry = NULL; - const char *command = argl[0]; + const char *command = NULL; int ret; if (argl == NULL) { errno = EINVAL; return -1; } + command = argl[0]; if (!*command) { errno = EINVAL;