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

Commit 7ef31d27 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: add boundary check for active config"

parents d5dc0406 e267dc89
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5323,7 +5323,8 @@ status_t SurfaceFlinger::onTransact(uint32_t code, const Parcel& data, Parcel* r
            case 1035: {
                n = data.readInt32();
                mDebugDisplayConfigSetByBackdoor = false;
                if (n >= 0) {
                const auto numConfigs = mRefreshRateConfigs->getAllRefreshRates().size();
                if (n >= 0 && n < numConfigs) {
                    const auto displayToken = getInternalDisplayToken();
                    status_t result = setActiveConfig(displayToken, n);
                    if (result != NO_ERROR) {