diff --git a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp index b37ea8e9..8d65b146 100644 --- a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp +++ b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp @@ -3821,7 +3821,8 @@ TEST_P(OEMCryptoLicenseOverflowTest, TestLoadLicenseForOutOfRangeSubStringOffSetAndLengths( [](size_t response_message_length, LicenseRoundTrip* license_messages) { auto& pst = license_messages->core_response().pst; - pst.offset = response_message_length - pst.length + 1; + pst.offset = response_message_length; + if (pst.length == 0) pst.length = 1; }); } @@ -3864,8 +3865,8 @@ TEST_P( [](size_t response_message_length, LicenseRoundTrip* license_messages) { auto& srm_restriction_data = license_messages->core_response().srm_restriction_data; - srm_restriction_data.offset = - response_message_length - srm_restriction_data.length + 1; + srm_restriction_data.offset = response_message_length; + if (srm_restriction_data.length == 0) srm_restriction_data.length = 1; }); }