mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Merge PR #759: Protocol.c: fix crash with OpenVPN when the certificate's common name is empty
This commit is contained in:
commit
99a029c7c4
@ -7094,8 +7094,7 @@ PACK *PackLoginWithOpenVPNCertificate(char *hubname, char *username, X *x)
|
|||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
wcstombs(cn_username, x->subject_name->CommonName, 127);
|
UniToStr(cn_username, sizeof(cn_username), x->subject_name->CommonName);
|
||||||
cn_username[127] = '\0';
|
|
||||||
PackAddStr(p, "username", cn_username);
|
PackAddStr(p, "username", cn_username);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user