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

Commit 3621c056 authored by Joshua J. Drake's avatar Joshua J. Drake Committed by Android Git Automerger
Browse files

am bcc8e581: am bb99a362: am 8d60fc3e: am 338bbf53: am fd334e34: am 03d539a7:...

am bcc8e581: am bb99a362: am 8d60fc3e: am 338bbf53: am fd334e34: am 03d539a7: am a5b9055d: am f1ce97dd: Fix integer overflow when handling MPEG4 tx3g atom

* commit 'bcc8e581':
  Fix integer overflow when handling MPEG4 tx3g atom
parents d0af1ded bcc8e581
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1638,7 +1638,14 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                size = 0;
            }

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

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

            if (size > 0) {
                memcpy(buffer, data, size);