sdm: hwc2: validate display id in SetColorModeById
Bug: 63144992 Test: manual vndservice call Change-Id: I239670334560b9db4ef781aac2612a86ea4363a9
This commit is contained in:
parent
e0f39648ed
commit
cba1cee475
|
@ -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