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

Commit 95d26de9 authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am 7b5b27ad: Merge "Properly identify malformed (too short) chunks in mpeg4...

am 7b5b27ad: Merge "Properly identify malformed (too short) chunks in mpeg4 files." into gingerbread

Merge commit '7b5b27ad' into gingerbread-plus-aosp

* commit '7b5b27ad':
  Properly identify malformed (too short) chunks in mpeg4 files.
parents 82677b95 7b5b27ad
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -428,6 +428,14 @@ status_t MPEG4Extractor::parseChunk(off_t *offset, int depth) {
        }
        }
        chunk_size = ntoh64(chunk_size);
        chunk_size = ntoh64(chunk_size);
        data_offset += 8;
        data_offset += 8;

        if (chunk_size < 16) {
            // The smallest valid chunk is 16 bytes long in this case.
            return ERROR_MALFORMED;
        }
    } else if (chunk_size < 8) {
        // The smallest valid chunk is 8 bytes long.
        return ERROR_MALFORMED;
    }
    }


    char chunk[5];
    char chunk[5];