diff options
author | Daiyuu Nobori <da.git@softether.co.jp> | 2017-10-18 10:36:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 10:36:24 +0300 |
commit | b61882598f90de1af5130022caed9eddfb73c57c (patch) | |
tree | 0eebde9098a825f4b26ddc972e8dfde2067da16b /src/Cedar/Interop_OpenVPN.c | |
parent | e9006faf0c8739147ab97e27fe11c5cdd20ed9e6 (diff) | |
parent | 78bcc07fa9cbbcaff21c8fad95eac52174c8cbb3 (diff) |
Merge pull request #256 from cm0x4D/master
Using client parameter in function CtConnect
Diffstat (limited to 'src/Cedar/Interop_OpenVPN.c')
-rw-r--r-- | src/Cedar/Interop_OpenVPN.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Cedar/Interop_OpenVPN.c b/src/Cedar/Interop_OpenVPN.c index 801f48b9..1eb57f82 100644 --- a/src/Cedar/Interop_OpenVPN.c +++ b/src/Cedar/Interop_OpenVPN.c @@ -1151,14 +1151,17 @@ UINT OvsParseKeyMethod2(OPENVPN_KEY_METHOD_2 *ret, UCHAR *data, UINT size, bool // Random2
if (ReadBuf(b, ret->Random2, sizeof(ret->Random2)) == sizeof(ret->Random2))
{
- // String
- if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
- OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
- OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)) &&
- OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
- {
- read_size = b->Current;
- }
+ // String
+ if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
+ OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
+ OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)))
+ {
+ if (!OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
+ {
+ Zero(ret->PeerInfo, sizeof(ret->PeerInfo));
+ }
+ read_size = b->Current;
+ }
}
}
}
|