diff --git a/src/Cedar/IPsec_IKE.c b/src/Cedar/IPsec_IKE.c index dfe56168..a35d8467 100644 --- a/src/Cedar/IPsec_IKE.c +++ b/src/Cedar/IPsec_IKE.c @@ -1662,7 +1662,6 @@ void StartQuickMode(IKE_SERVER *ike, IKE_CLIENT *c) UINT spi; UINT spi_be; UCHAR hash1[IKE_MAX_HASH_SIZE]; - UCHAR zero = 0; DH_CTX *dh = NULL; UCHAR dummy_hash_data[IKE_MAX_HASH_SIZE]; @@ -3842,6 +3841,10 @@ bool IkeIsVendorIdExists(IKE_PACKET *p, char *str) for (i = 0;i < num;i++) { IKE_PACKET_PAYLOAD *payload = IkeGetPayload(p->PayloadList, IKE_PAYLOAD_VENDOR_ID, i); + if (payload == NULL) + { + return false; + } if (CompareBuf(payload->Payload.VendorId.Data, buf)) { @@ -4325,7 +4328,7 @@ IKE_CLIENT *SearchOrCreateNewIkeClientForIkePacket(IKE_SERVER *ike, IP *client_i { IKE_CLIENT *c; // Validate arguments - if (ike == NULL || pr == NULL || client_ip == NULL || server_ip == NULL || client_port == 0 || server_port == 0 || pr == NULL) + if (ike == NULL || pr == NULL || client_ip == NULL || server_ip == NULL || client_port == 0 || server_port == 0) { return NULL; }