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

Commit 814e728b authored by Pat Tjin's avatar Pat Tjin Committed by Android Git Automerger
Browse files

am deb6baa6: Merge "surfaceflinger: Fix range check for getFormat" into mnc-dev

* commit 'deb6baa6':
  surfaceflinger: Fix range check for getFormat
parents e68dad2a deb6baa6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -461,7 +461,7 @@ sp<Fence> HWComposer::getDisplayFence(int disp) const {
}

uint32_t HWComposer::getFormat(int disp) const {
    if (uint32_t(disp)>31 || !mAllocatedDisplayIDs.hasBit(disp)) {
    if (static_cast<uint32_t>(disp) >= MAX_HWC_DISPLAYS || !mAllocatedDisplayIDs.hasBit(disp)) {
        return HAL_PIXEL_FORMAT_RGBA_8888;
    } else {
        return mDisplayData[disp].format;