Commit 6debd28b authored by jihwan.seo's avatar jihwan.seo Committed by Patrick Lankswert

Modified to check Payload for TCP

to check payload have to contain option data.

Change-Id: Ib8d1cb9946cd1e4723531de986129e8e30f32c09
Signed-off-by: default avatarjihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3569Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarPatrick Lankswert <patrick.lankswert@intel.com>
(cherry picked from commit 86209b2c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/3643
parent f8611049
......@@ -639,7 +639,10 @@ static size_t CACheckPayloadLength(const void *data, size_t dlen)
}
size_t payloadLen = 0;
if (pdu->data)
size_t headerSize = coap_get_tcp_header_length_for_transport(transport);
OIC_LOG_V(DEBUG, TAG, "headerSize : %d, pdu length : %d",
headerSize, pdu->length);
if (pdu->length > headerSize)
{
payloadLen = (unsigned char *) pdu->hdr + pdu->length - pdu->data;
OICFree(pdu);
......
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