summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-01-09 10:06:40 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-01-09 10:06:40 +0000
commitf3e0fde696fb0f9b883be5b6c6baa90bedc5c315 (patch)
treed4c2a0dab00afe7c74fc1514ba85abf3489cfbac
parent22cd1cb8bf92e2be02cbae1a6f15bc7c14750462 (diff)
parent10d9ddfe37d067757b28e6d6270d3ce0ab150f9a (diff)
downloadplatform_hardware_qcom_display-android10-d4-release.tar.gz
platform_hardware_qcom_display-android10-d4-release.tar.bz2
platform_hardware_qcom_display-android10-d4-release.zip
Snap for 6122036 from 10d9ddfe37d067757b28e6d6270d3ce0ab150f9a to qt-d4-releaseandroid-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android10-d4-s1-releaseandroid10-d4-release
Change-Id: Ia5427fe000052a36e90947ceff834e432fd68bf5
-rw-r--r--msm8998/sdm/libs/hwc2/hwc_session.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/msm8998/sdm/libs/hwc2/hwc_session.cpp b/msm8998/sdm/libs/hwc2/hwc_session.cpp
index 0a8576ce..f0776678 100644
--- a/msm8998/sdm/libs/hwc2/hwc_session.cpp
+++ b/msm8998/sdm/libs/hwc2/hwc_session.cpp
@@ -992,7 +992,7 @@ android::status_t HWCSession::HandleSetActiveDisplayConfig(const android::Parcel
int dpy = input_parcel->readInt32();
int error = android::BAD_VALUE;
- if (dpy > HWC_DISPLAY_VIRTUAL) {
+ if (dpy < HWC_DISPLAY_PRIMARY || dpy > HWC_DISPLAY_VIRTUAL) {
return android::BAD_VALUE;
}
@@ -1011,7 +1011,7 @@ android::status_t HWCSession::HandleGetActiveDisplayConfig(const android::Parcel
int dpy = input_parcel->readInt32();
int error = android::BAD_VALUE;
- if (dpy > HWC_DISPLAY_VIRTUAL) {
+ if (dpy < HWC_DISPLAY_PRIMARY || dpy > HWC_DISPLAY_VIRTUAL) {
return android::BAD_VALUE;
}
@@ -1031,7 +1031,7 @@ android::status_t HWCSession::HandleGetDisplayConfigCount(const android::Parcel
int dpy = input_parcel->readInt32();
int error = android::BAD_VALUE;
- if (dpy > HWC_DISPLAY_VIRTUAL) {
+ if (dpy < HWC_DISPLAY_PRIMARY || dpy > HWC_DISPLAY_VIRTUAL) {
return android::BAD_VALUE;
}
@@ -1055,7 +1055,7 @@ android::status_t HWCSession::HandleGetDisplayAttributesForConfig(const android:
int error = android::BAD_VALUE;
DisplayConfigVariableInfo display_attributes;
- if (dpy > HWC_DISPLAY_VIRTUAL) {
+ if (dpy < HWC_DISPLAY_PRIMARY || dpy >= HWC_NUM_DISPLAY_TYPES || config < 0) {
return android::BAD_VALUE;
}
@@ -1251,7 +1251,7 @@ android::status_t HWCSession::SetColorModeOverride(const android::Parcel *input_
auto mode = static_cast<android_color_mode_t>(input_parcel->readInt32());
auto device = static_cast<hwc2_device_t *>(this);
- if (display > HWC_DISPLAY_VIRTUAL) {
+ if (display >= HWC_NUM_DISPLAY_TYPES) {
return -EINVAL;
}
@@ -1266,7 +1266,7 @@ android::status_t HWCSession::SetColorModeById(const android::Parcel *input_parc
auto mode = input_parcel->readInt32();
auto device = static_cast<hwc2_device_t *>(this);
- if (display > HWC_DISPLAY_VIRTUAL) {
+ if (display >= HWC_NUM_DISPLAY_TYPES) {
return -EINVAL;
}
@@ -1621,7 +1621,7 @@ android::status_t HWCSession::GetVisibleDisplayRect(const android::Parcel *input
SCOPE_LOCK(locker_);
int dpy = input_parcel->readInt32();
- if (dpy < HWC_DISPLAY_PRIMARY || dpy > HWC_DISPLAY_VIRTUAL) {
+ if (dpy < HWC_DISPLAY_PRIMARY || dpy >= HWC_NUM_DISPLAY_TYPES) {
return android::BAD_VALUE;
}