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

Commit c9a3ea62 authored by Robert Shih's avatar Robert Shih Committed by Android Git Automerger
Browse files

am b70b09c9: Merge "OMXCodec: fix potential OOB read in parseHEVCCodecSpecificData"

* commit 'b70b09c9':
  OMXCodec: fix potential OOB read in parseHEVCCodecSpecificData
parents 69a4f949 b70b09c9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ status_t OMXCodec::parseHEVCCodecSpecificData(
    const uint8_t *ptr = (const uint8_t *)data;

    // verify minimum size and configurationVersion == 1.
    if (size < 7 || ptr[0] != 1) {
    if (size < 23 || ptr[0] != 1) {
        return ERROR_MALFORMED;
    }

@@ -404,6 +404,9 @@ status_t OMXCodec::parseHEVCCodecSpecificData(
    size -= 1;
    size_t j = 0, i = 0;
    for (i = 0; i < numofArrays; i++) {
        if (size < 3) {
            return ERROR_MALFORMED;
        }
        ptr += 1;
        size -= 1;