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

Commit 2177359d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Prevent OOB write in MPEG4Writer::writeIpcoBox()" into main am: 042ab94a am: d44ce1a6

parents 2b9db132 d44ce1a6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2640,6 +2640,11 @@ void MPEG4Writer::Track::addItemOffsetAndSize(off64_t offset, size_t size, bool
    }

    if (mProperties.empty()) {
        // Min length of hvcC CSD is 23. (ISO/IEC 14496-15:2014 Chapter 8.4.1.1.2)
        if (mIsHeif && mCodecSpecificDataSize < 23) {
            ALOGE("hvcC csd size is less than 23 bytes");
            return;
        }
        mProperties.push_back(mOwner->addProperty_l({
            .type = static_cast<uint32_t>(mIsAvif ?
                  FOURCC('a', 'v', '1', 'C') :