token lengths 9~15 are reserved.
it must be preocessed as a message format error.
Change-Id: I84b2e51b7364fef4e4dae0d60b1b5010fd059ad2
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2235
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
return NULL;
}
+ if (outpdu->hdr->token_length > CA_MAX_TOKEN_LEN)
+ {
+ OIC_LOG_V(ERROR, TAG, "token length has been exceed : %d",
+ outpdu->hdr->token_length);
+ coap_delete_pdu(outpdu);
+ return NULL;
+ }
+
if (outCode)
{
(*outCode) = (uint32_t) CA_RESPONSE_CODE(outpdu->hdr->code);