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

Commit 42495748 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

AACExtractor: check bounds during seek am: 07905810 am: a896e5b7

am: be8e054c

Change-Id: Ib9c2ca9f7bbd40481ce7f74f99bfac34fe0b0a14
parents 280f4197 be8e054c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -292,6 +292,10 @@ status_t AACSource::read(
    if (options && options->getSeekTo(&seekTimeUs, &mode)) {
        if (mFrameDurationUs > 0) {
            int64_t seekFrame = seekTimeUs / mFrameDurationUs;
            if (seekFrame < 0 || seekFrame >= (int64_t)mOffsetVector.size()) {
                android_errorWriteLog(0x534e4554, "70239507");
                return ERROR_MALFORMED;
            }
            mCurrentTimeUs = seekFrame * mFrameDurationUs;

            mOffset = mOffsetVector.itemAt(seekFrame);