mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-10-22 01:51:20 +03:00
Protocol.c: fix crash with OpenVPN when the certificate's common name is empty
This commit is contained in:
1 parent
966a5e6dea
commit
f061557aad
1 file changed
+1
-2
@@ -7094,8 +7094,7 @@ PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
wcstombs(cn_username, x->subject_name->CommonName, 127);
|
||||
cn_username[127] = '\0';
|
||||
UniToStr(cn_username, sizeof(cn_username), x->subject_name->CommonName);
|
||||
PackAddStr(p, "username", cn_username);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user