Commit 1a32ec0a authored by Senthil Kumar G S's avatar Senthil Kumar G S Committed by Ashok Babu Channa

[IOT-2339] Add NULL check before variable access.

Added null check for 'sendData->remoteEndpoint' before the members
of remoteEndpoint gets accessed.

Change-Id: Ic4fc56087bcf9f72233f823ab5aaf0c39ec34afa
Signed-off-by: default avatarSenthil Kumar G S <>
Reviewed-on: default avatarjenkins-iotivity <>
Reviewed-by: default avatarHarish Marappa <>
Reviewed-by: default avatarAshok Babu Channa <>
parent 578ba076
......@@ -944,7 +944,7 @@ CAResult_t CASetNextBlockOption1(coap_pdu_t *pdu, const CAEndpoint_t *endpoint,
endpoint->addr, endpoint->port);
if ((NULL == blockDataID) || (blockDataID->idLength < 1) ||
if ((NULL == blockDataID) || (blockDataID->idLength < 1) ||
(blockDataID->idLength > UINT8_MAX))
OIC_LOG(ERROR, TAG, "blockId is incorrect");
......@@ -2501,7 +2501,7 @@ CAResult_t CACheckBlockDataValidation(const CAData_t *sendData, CABlockData_t **
VERIFY_NON_NULL(sendData, TAG, "sendData");
VERIFY_NON_NULL(blockData, TAG, "blockData");
if (sendData->responseInfo)
if (sendData->responseInfo && sendData->remoteEndpoint)
CABlockDataID_t* blockDataID = CACreateBlockDatablockId(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment