surfaceflinger: Access s3d flags only for valid display ID.
- Check if display id is within display ID range. Negative display ids lead to undefined behavior in CTS tests. Change-Id: I2db8caf8d7ac65700e5bc37c180763357cc90aad CRs-Fixed: 1043297
This commit is contained in:
parent
3b418d69a3
commit
a5f80a555a
@ -82,6 +82,9 @@ uint32_t ExHWComposer::getS3DFlag(int disp) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mHwc || uint32_t(disp) >= MAX_HWC_DISPLAYS || !mAllocatedDisplayIDs.hasBit(disp))
|
||||
return 0;
|
||||
|
||||
const DisplayData& disp_data(mDisplayData[disp]);
|
||||
|
||||
for (size_t i=0 ; i<disp_data.list->numHwLayers-1; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user