Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c31e432 authored by Edwin Wong's avatar Edwin Wong Committed by Automerger Merge Worker
Browse files

Merge "Check scopeId size in provideKeyResponse" into rvc-dev am: 350456e9...

Merge "Check scopeId size in provideKeyResponse" into rvc-dev am: 350456e9 am: 58602217 am: ac9f3f72

Change-Id: Idf98d0d044240b4051672195af4c95b72b5df1dd
parents 5bd35428 ac9f3f72
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -356,6 +356,11 @@ Return<void> DrmPlugin::provideKeyResponse(

    Status status = Status::OK;
    bool isOfflineLicense = responseString.find(kOfflineLicense) != std::string::npos;
    if (scopeId.size() < kKeySetIdPrefix.size()) {
        android_errorWriteLog(0x534e4554, "144507096");
        _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, hidl_vec<uint8_t>());
        return Void();
    }
    bool isRelease = (memcmp(scopeId.data(), kKeySetIdPrefix.data(), kKeySetIdPrefix.size()) == 0);
    if (isRelease) {
        keySetId.assign(scopeId.begin(), scopeId.end());