diff --git a/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp b/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp index e3633a2c..194b2ee6 100644 --- a/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp +++ b/libwvdrmengine/cdm/core/src/oemcrypto_adapter_dynamic.cpp @@ -885,6 +885,16 @@ class Adapter { LOOKUP_ALL(16, MinorAPIVersion, OEMCrypto_MinorAPIVersion); // clang-format on + // There was a mistake in version 16.3 of the header that did not rename + // OEMCrypto_AllocateSecureBuffer or OEMCrypto_FreeSecureBuffer + if (level1_.AllocateSecureBuffer == NULL || + level1_.FreeSecureBuffer == NULL) { + level1_.AllocateSecureBuffer = (L1_AllocateSecureBuffer_t)dlsym( + level1_library_, "OEMCrypto_AllocateSecureBuffer"); + level1_.FreeSecureBuffer = (L1_FreeSecureBuffer_t)dlsym( + level1_library_, "OEMCrypto_FreeSecureBuffer"); + } + // TODO(119830252): make the code below available to a static adapter. // Check if the keybox or oem certificate is valid, if so, we are finished // with initialization.