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

Commit baa7ec9b authored by George Burgess IV's avatar George Burgess IV Committed by android-build-merger
Browse files

Merge "nuplayer2: Fix two use-after-frees"

am: b6eac609

Change-Id: I80eec84fe15876049cbfe82c4d7d8072508868fe
parents 44b720db b6eac609
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -148,9 +148,10 @@ sp<ABuffer> NuPlayer2Drm::retrieveDrmInfo(PsshInfo *psshInfo)
    }
    }


    uint32_t psshSize = pssh.tellp();
    uint32_t psshSize = pssh.tellp();
    const uint8_t* psshPtr = reinterpret_cast<const uint8_t*>(pssh.str().c_str());
    std::string psshBase = pssh.str();
    const char *psshHex = DrmUUID::arrayToHex(psshPtr, psshSize).string();
    const auto* psshPtr = reinterpret_cast<const uint8_t*>(psshBase.c_str());
    ALOGV("retrieveDrmInfo: MEDIA_DRM_INFO  PSSH: size: %u %s", psshSize, psshHex);
    ALOGV("retrieveDrmInfo: MEDIA_DRM_INFO  PSSH: size: %u %s", psshSize,
            DrmUUID::arrayToHex(psshPtr, psshSize).string());


    // 1) Write PSSH bytes
    // 1) Write PSSH bytes
    drmInfo.write(reinterpret_cast<const char *>(&psshSize), sizeof(psshSize));
    drmInfo.write(reinterpret_cast<const char *>(&psshSize), sizeof(psshSize));