diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 773ef9a4..22907a36 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -4621,7 +4621,7 @@ REDIRECTED: UINT use_port = 0; UINT current_port = c->ServerPort; UCHAR ticket[SHA1_SIZE]; - X *server_cert; + X *server_cert = NULL; BUF *b; // Redirect mode diff --git a/src/Cedar/Sam.c b/src/Cedar/Sam.c index 49eeb575..3836dc5e 100644 --- a/src/Cedar/Sam.c +++ b/src/Cedar/Sam.c @@ -114,7 +114,10 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna char buffer[255]; char ntlm_timeout[32]; char* proc_parameter[6]; - + + // DNS Name 255 chars + OU names are limited to 64 characters + cmdline 32 + 1 + char requiremember[352]; + if (name == NULL || password == NULL || domainname == NULL || groupname == NULL) { Debug("Sam.c - SmbAuthenticate - wrong password parameter\n"); @@ -156,14 +159,11 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna if (strlen(groupname) > 1) { - // DNS Name 255 chars + OU names are limited to 64 characters + cmdline 32 + 1 - char requiremember[352]; - // Truncate string if unsafe char EnSafeStr(groupname, '\0'); snprintf(requiremember, sizeof(requiremember), "--require-membership-of=%s\\%s", domainname, groupname); - + proc_parameter[4] = requiremember; proc_parameter[5] = 0; }