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

Commit 5250bc1b authored by Jeff Tinker's avatar Jeff Tinker Committed by android-build-merger
Browse files

Fix integer overflow in mediadrmserver

am: eb21712f

Change-Id: I0caf94590f85f444a4705f62792c27a447fa8b69
parents 8ff995a8 eb21712f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ android::status_t InitDataParser::parsePssh(const Vector<uint8_t>& initData,
    memcpy(&keyIdCount, &initData[readPosition], sizeof(keyIdCount));
    keyIdCount = ntohl(keyIdCount);
    readPosition += sizeof(keyIdCount);
    if (readPosition + (keyIdCount * kKeyIdSize) !=
    if (readPosition + ((uint64_t)keyIdCount * kKeyIdSize) !=
            initData.size() - sizeof(uint32_t)) {
        return android::ERROR_DRM_CANNOT_HANDLE;
    }