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

Commit b2d33aee authored by Nick Kralevich's avatar Nick Kralevich
Browse files

MPEG4Extractor.cpp: Add check for size == SIZE_MAX

If size == SIZE_MAX, the line:

  uint8_t *buffer = new (std::nothrow) uint8_t[size + 1];

ends up allocating zero bytes, which is obviously incorrect.

Change-Id: I7d44a66b67c590041572e25d1fbd1de94401a77f
parent ff867380
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2435,7 +2435,7 @@ status_t MPEG4Extractor::parseTrackHeader(
}

status_t MPEG4Extractor::parseITunesMetaData(off64_t offset, size_t size) {
    if (size < 4) {
    if (size < 4 || size == SIZE_MAX) {
        return ERROR_MALFORMED;
    }