Merge "surfaceflinger: Fix range check for getFormat" into mnc-dev
This commit is contained in:
commit
deb6baa6b3
@ -461,7 +461,7 @@ sp<Fence> HWComposer::getDisplayFence(int disp) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t HWComposer::getFormat(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;
|
return HAL_PIXEL_FORMAT_RGBA_8888;
|
||||||
} else {
|
} else {
|
||||||
return mDisplayData[disp].format;
|
return mDisplayData[disp].format;
|
||||||
|
Loading…
Reference in New Issue
Block a user