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

Commit 7d3be414 authored by Wei Jia's avatar Wei Jia Committed by Android Git Automerger
Browse files

am f475f6c0: am e168bdd2: am f19acf48: am 66b91b34: am e6382cb0: am 115e995c:...

am f475f6c0: am e168bdd2: am f19acf48: am 66b91b34: am e6382cb0: am 115e995c: resolved conflicts for merge of 1f44d837 to lmp-dev

* commit 'f475f6c0':
  Fix integer overflow when handling MPEG4 tx3g atom
parents 7e2d436f f475f6c0
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1897,6 +1897,10 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                size = 0;
                size = 0;
            }
            }


            if (SIZE_MAX - chunk_size <= size) {
                return ERROR_MALFORMED;
            }

            uint8_t *buffer = new (std::nothrow) uint8_t[size + chunk_size];
            uint8_t *buffer = new (std::nothrow) uint8_t[size + chunk_size];
            if (buffer == NULL) {
            if (buffer == NULL) {
                return ERROR_MALFORMED;
                return ERROR_MALFORMED;