diff options
Diffstat (limited to 'src/Cedar/IPsec_IKE.c')
-rw-r--r-- | src/Cedar/IPsec_IKE.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Cedar/IPsec_IKE.c b/src/Cedar/IPsec_IKE.c index aea01040..eff09b78 100644 --- a/src/Cedar/IPsec_IKE.c +++ b/src/Cedar/IPsec_IKE.c @@ -4723,11 +4723,13 @@ bool GetBestTransformSettingForIPsecSa(IKE_SERVER *ike, IKE_PACKET *pr, IPSEC_SA if (transform_payload != NULL)
{
IKE_PACKET_TRANSFORM_PAYLOAD *transform = &transform_payload->Payload.Transform;
- IPSEC_SA_TRANSFORM_SETTING *set = NULL;
+ IPSEC_SA_TRANSFORM_SETTING set;
- if (TransformPayloadToTransformSettingForIPsecSa(ike, transform, set, server_ip))
+ Zero(&set, sizeof(set));
+
+ if (TransformPayloadToTransformSettingForIPsecSa(ike, transform, &set, server_ip))
{
- Copy(setting, set, sizeof(IPSEC_SA_TRANSFORM_SETTING));
+ Copy(setting, &set, sizeof(IPSEC_SA_TRANSFORM_SETTING));
setting->SpiServerToClient = READ_UINT(proposal->Spi->Buf);
@@ -4735,11 +4737,11 @@ bool GetBestTransformSettingForIPsecSa(IKE_SERVER *ike, IKE_PACKET *pr, IPSEC_SA }
else
{
- if (set != NULL && set->OnlyCapsuleModeIsInvalid)
+ if (set.OnlyCapsuleModeIsInvalid)
{
if (ocmii_flag == false)
{
- Copy(setting, set, sizeof(IPSEC_SA_TRANSFORM_SETTING));
+ Copy(setting, &set, sizeof(IPSEC_SA_TRANSFORM_SETTING));
ocmii_flag = true;
}
}
|