Issue : If the first character of deviceuuid generated ramdomly is *(2a) in PT,
subjectuuid of cred is set to * wrongly instead of actual deviceuuid
during generating cred payload during OT.
Change-Id: Idc6587d71456a1eb7a816bd083bfcbb5c94e9c34
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18041
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
cborEncoderResult = cbor_encode_text_string(&credMap, OIC_JSON_SUBJECTID_NAME,
strlen(OIC_JSON_SUBJECTID_NAME));
VERIFY_CBOR_SUCCESS(TAG, cborEncoderResult, "Failed Adding Subject Tag.");
- inLen = (memcmp(&(cred->subject), &WILDCARD_SUBJECT_ID, WILDCARD_SUBJECT_ID_LEN) == 0) ?
+ inLen = (memcmp(&(cred->subject), &WILDCARD_SUBJECT_ID, sizeof(OicUuid_t)) == 0) ?
WILDCARD_SUBJECT_ID_LEN : sizeof(OicUuid_t);
if(inLen == WILDCARD_SUBJECT_ID_LEN)
{