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

Commit 7a22df06 authored by Jeff Tinker's avatar Jeff Tinker Committed by android-build-merger
Browse files

Fix integer overflow in mediadrmserver am: eb21712f am: 5250bc1b

am: d1a854a0

Change-Id: I212669c64a748fed506b8b4a90a568aa91d01787
parents 98a47295 d1a854a0
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;
    }