sdm: hwc2: validate display id in SetColorModeById am: cba1cee475
am: 017c58a2ad
Change-Id: I504b64b503635f17a5a66e801b293877a63cb120
This commit is contained in:
commit
bd8cdbdcaa
|
@ -1254,6 +1254,11 @@ android::status_t HWCSession::SetColorModeById(const android::Parcel *input_parc
|
|||
auto display = static_cast<hwc2_display_t >(input_parcel->readInt32());
|
||||
auto mode = input_parcel->readInt32();
|
||||
auto device = static_cast<hwc2_device_t *>(this);
|
||||
|
||||
if (display > HWC_DISPLAY_VIRTUAL) {
|
||||
return android::BAD_VALUE;
|
||||
}
|
||||
|
||||
auto err = CallDisplayFunction(device, display, &HWCDisplay::SetColorModeById, mode);
|
||||
if (err != HWC2_ERROR_NONE)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue