diff options
author | Dan Stoza <stoza@google.com> | 2014-06-19 17:46:47 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-17 21:43:29 +0000 |
commit | eac96b9bfd476e1c7866e5ae685e941be97513dd (patch) | |
tree | 56aafed18242f9bc09d55fa9cabdd3e6290cbdcb /services | |
parent | a317f27b7bf49e2e7b2b443223c07fb8c7c3ac3f (diff) | |
parent | be31f447984b3ab4ac011353b6b53216b4335e04 (diff) | |
download | frameworks_native-eac96b9bfd476e1c7866e5ae685e941be97513dd.zip frameworks_native-eac96b9bfd476e1c7866e5ae685e941be97513dd.tar.gz frameworks_native-eac96b9bfd476e1c7866e5ae685e941be97513dd.tar.bz2 |
Merge "SurfaceFlinger: Fix rect out-of-bounds checks"
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 4ecdc8b..4238ef8 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2873,14 +2873,14 @@ void SurfaceFlinger::renderScreenImplLocked( if (sourceCrop.left < 0) { ALOGE("Invalid crop rect: l = %d (< 0)", sourceCrop.left); } - if (sourceCrop.right >= hw_w) { - ALOGE("Invalid crop rect: r = %d (>= %d)", sourceCrop.right, hw_w); + if (sourceCrop.right > hw_w) { + ALOGE("Invalid crop rect: r = %d (> %d)", sourceCrop.right, hw_w); } if (sourceCrop.top < 0) { ALOGE("Invalid crop rect: t = %d (< 0)", sourceCrop.top); } - if (sourceCrop.bottom >= hw_h) { - ALOGE("Invalid crop rect: b = %d (>= %d)", sourceCrop.bottom, hw_h); + if (sourceCrop.bottom > hw_h) { + ALOGE("Invalid crop rect: b = %d (> %d)", sourceCrop.bottom, hw_h); } // make sure to clear all GL error flags |