Merge "Fix Buffer Overflow in Vendor Service display.qservice" into pi-dev
This commit is contained in:
commit
9e45a258ff
|
@ -1221,6 +1221,11 @@ android::status_t HWCSession::SetColorModeOverride(const android::Parcel *input_
|
|||
auto display = static_cast<hwc2_display_t >(input_parcel->readInt32());
|
||||
auto mode = static_cast<android_color_mode_t>(input_parcel->readInt32());
|
||||
auto device = static_cast<hwc2_device_t *>(this);
|
||||
|
||||
if (display > HWC_DISPLAY_VIRTUAL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
auto err = CallDisplayFunction(device, display, &HWCDisplay::SetColorMode, mode);
|
||||
if (err != HWC2_ERROR_NONE)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -1250,6 +1250,11 @@ android::status_t HWCSession::SetColorModeOverride(const android::Parcel *input_
|
|||
auto display = static_cast<hwc2_display_t >(input_parcel->readInt32());
|
||||
auto mode = static_cast<android_color_mode_t>(input_parcel->readInt32());
|
||||
auto device = static_cast<hwc2_device_t *>(this);
|
||||
|
||||
if (display > HWC_DISPLAY_VIRTUAL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
auto err = CallDisplayFunction(device, display, &HWCDisplay::SetColorMode, mode);
|
||||
if (err != HWC2_ERROR_NONE)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue