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

Commit 25283404 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Fix overflow check so it doesn\'t reject legitimate files" am: 7534cb3a am: 7e150264

am: e00d020b

* commit 'e00d020b':
  Fix overflow check so it doesn't reject legitimate files
parents 4d81d15f e00d020b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ status_t SampleTable::setSampleToChunkParams(
    for (uint32_t i = 0; i < mNumSampleToChunkOffsets; ++i) {
        uint8_t buffer[12];

        if ((off64_t)((SIZE_MAX / 12) - 8 - i) < mSampleToChunkOffset) {
        if ((off64_t)(SIZE_MAX - 8 - (i * 12)) < mSampleToChunkOffset) {
            return ERROR_MALFORMED;
        }