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

Commit 0b305f2d authored by Wei Jia's avatar Wei Jia Committed by Android (Google) Code Review
Browse files

Merge "MPEG4Writer: add check to ensure no integer overflow on allocation." into mnc-dev

parents d46a6b9f 2177f21c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@ private:
            mCurrTableEntriesElement(NULL) {
            CHECK_GT(mElementCapacity, 0);
            CHECK_GT(mEntryCapacity, 0);
            // Ensure no integer overflow on allocation in add().
            CHECK_LT(mEntryCapacity, UINT32_MAX / mElementCapacity);
        }

        // Free the allocated memory.