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

Commit 427887bc authored by Vasantha Balla's avatar Vasantha Balla Committed by Steve Kondik
Browse files

libstagefright:Fix random memcmp crash while accessing output format.

Random memcmp crash happens while checking for image-data in
output format of audio buffer.Audio output format gets updated with
pcm-format flag after codec formatchange in ExtendedNuUtils.
Simultaneous memory check happens for image-data in FBD of MediaCodec.
So crash happens.

Avoid checking for image-data and crop information for audio buffers.

Change-Id: I85ffcb149dc67a0f1bdb26116245627b1843d932
parent 8ad65686
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2575,7 +2575,7 @@ ssize_t MediaCodec::dequeuePortBuffer(int32_t portIndex) {
        info->mOwnedByClient = true;

        // set image-data
        if (info->mFormat != NULL) {
        if (info->mFormat != NULL && mIsVideo) {
            sp<ABuffer> imageData;
            if (info->mFormat->findBuffer("image-data", &imageData)) {
                info->mData->meta()->setBuffer("image-data", imageData);