summaryrefslogtreecommitdiffstats
path: root/source/smbd/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/smbd/service.c')
-rw-r--r--source/smbd/service.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/smbd/service.c b/source/smbd/service.c
index 4724dd7a59f..2a1ef20174c 100644
--- a/source/smbd/service.c
+++ b/source/smbd/service.c
@@ -55,6 +55,10 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
const char *s = connectpath;
bool start_of_name_component = true;
+ if (connectpath == NULL || connectpath[0] == '\0') {
+ return false;
+ }
+
destname = SMB_STRDUP(connectpath);
if (!destname) {
return false;
@@ -331,7 +335,7 @@ int add_home_service(const char *service, const char *username, const char *home
{
int iHomeService;
- if (!service || !homedir)
+ if (!service || !homedir || homedir[0] == '\0')
return -1;
if ((iHomeService = lp_servicenumber(HOMES_NAME)) < 0) {