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

Commit f55ca04e authored by Vignesh Venkatasubramanian's avatar Vignesh Venkatasubramanian
Browse files

FrameDecoder: clamp displayWidth and displayHeight

Make sure they are not greater than the actual width/height.

Bug: 316481431
Test: atest android.security.cts.StagefrightTest#testStagefright_bug_73172046
Change-Id: Ic520c639cdf08e147c5cacdad84ad764a493c919
parent a48b703e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -102,6 +102,13 @@ sp<IMemory> allocVideoFrame(const sp<MetaData>& trackMeta,
            displayTop = 0;
        }
    }
    if (displayWidth > width) {
        displayWidth = width;
    }
    if (displayHeight > height) {
        displayHeight = height;
    }


    if (allocRotated) {
        if (rotationAngle == 90 || rotationAngle == 270) {