Fix implicit type conversion issue in ODK

Merging CL
https://widevine-internal-review.googlesource.com/c/cdm/+/100924 Fix implicit type conversion issue in ODK

1. Implicit cast is reported as error when compiling ODK with Level3
2. Override odk_add_overflow_xxx function with the built in functions can cause
redefinition issue when compiling Level3; Let's use odk customized overflow functions.

Bug: b/157510403
Test: ODK unittests and CDM unittests passed.
Change-Id: Ieef8ccfb41d08007ec72f4a061f92968e55539cb
This commit is contained in:
Cong Lin
2020-05-29 10:07:08 -07:00
parent dd70d63b76
commit 69e7e21882
3 changed files with 4 additions and 15 deletions

View File

@@ -151,7 +151,7 @@ static void Unpack_ODK_ParsedLicense(Message* msg, ODK_ParsedLicense* obj) {
Unpack_OEMCrypto_Substring(msg, &obj->enc_mac_keys);
Unpack_OEMCrypto_Substring(msg, &obj->pst);
Unpack_OEMCrypto_Substring(msg, &obj->srm_restriction_data);
obj->license_type = Unpack_enum(msg);
obj->license_type = (OEMCrypto_LicenseType)Unpack_enum(msg);
Unpack_bool(msg, &obj->nonce_required);
Unpack_ODK_TimerLimits(msg, &obj->timer_limits);
Unpack_uint32_t(msg, &obj->key_array_length);
@@ -167,7 +167,7 @@ static void Unpack_ODK_ParsedLicense(Message* msg, ODK_ParsedLicense* obj) {
static void Unpack_ODK_ParsedProvisioning(Message* msg,
ODK_ParsedProvisioning* obj) {
obj->key_type = Unpack_enum(msg);
obj->key_type = (OEMCrypto_PrivateKeyType)Unpack_enum(msg);
Unpack_OEMCrypto_Substring(msg, &obj->enc_private_key);
Unpack_OEMCrypto_Substring(msg, &obj->enc_private_key_iv);
Unpack_OEMCrypto_Substring(msg, &obj->encrypted_message_key);