1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

Merge pull request #1086 from jubnzv/sa-fixes

Fix some issues found with Cppcheck static analysis
This commit is contained in:
Ilya Shipitsin 2020-03-27 14:45:43 +05:00 committed by GitHub
commit 5db21a1dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -115,6 +115,9 @@ bool SmbAuthenticate(char* name, char* password, char* domainname, char* groupna
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,9 +159,6 @@ 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');