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

Commit d44ce1a6 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

parents 6c86f6ec 042ab94a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2535,6 +2535,11 @@ void MPEG4Writer::Track::addItemOffsetAndSize(off64_t offset, size_t size, bool
    bool hasGrid = (mTileWidth > 0);

    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') :