[automerger] Fix Buffer Overflow in Vendor Service display.qservice am: e10b84c30c
am: ad1d6cec09
am: 2ba224564b
am: 98a3c765db
Change-Id: I54d792c228c82bd7eed24279d112c121c74ed175
This commit is contained in:
commit
37851e41a7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue