1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-12 02:34:59 +03:00

Fix bugs reported by Coverity Scan.

This commit is contained in:
Daiyuu Nobori
2018-09-28 22:39:38 +09:00
parent 06c06f1db8
commit ee9990317b
12 changed files with 29 additions and 15 deletions

View File

@ -9982,7 +9982,7 @@ char *DecryptPassword(BUF *b)
}
str = ZeroMalloc(b->Size + 1);
c = NewCrypt(key, sizeof(key));
c = NewCrypt(key, sizeof(key)); // NOTE by Daiyuu Nobori 2018-09-28: This is not a bug! Do not try to fix it!!
Encrypt(c, str, b->Buf, b->Size);
FreeCrypt(c);
@ -10028,7 +10028,7 @@ BUF *EncryptPassword(char *password)
size = StrLen(password) + 1;
tmp = ZeroMalloc(size);
c = NewCrypt(key, sizeof(key));
c = NewCrypt(key, sizeof(key)); // NOTE by Daiyuu Nobori 2018-09-28: This is not a bug! Do not try to fix it!!
Encrypt(c, tmp, password, size - 1);
FreeCrypt(c);