diff options
author | Marco Nelissen <marcone@google.com> | 2016-03-21 11:31:53 -0700 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-04-21 19:09:55 -0700 |
commit | db829699d3293f254a7387894303451a91278986 (patch) | |
tree | 7ef2f940d1e8c4ce5f969828caa11b0a55067302 /media/libmedia | |
parent | 0bb5ced60304da7f61478ffd359e7ba65d72f181 (diff) | |
download | frameworks_av-db829699d3293f254a7387894303451a91278986.zip frameworks_av-db829699d3293f254a7387894303451a91278986.tar.gz frameworks_av-db829699d3293f254a7387894303451a91278986.tar.bz2 |
Fix OMX_IndexParamConsumerUsageBits size check
Bug: 27207275
Change-Id: I9a7c9fb22a0e84a490ff09c151bd2f88141fdbc0
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/IOMX.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 9be9b41..b082fe4 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -699,11 +699,12 @@ status_t BnOMX::onTransact( void *params = NULL; size_t pageSize = 0; size_t allocSize = 0; - if ((index == (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits && size < 4) || - (code != SET_INTERNAL_OPTION && size < 8)) { + bool isUsageBits = (index == (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits); + if ((isUsageBits && size < 4) || + (!isUsageBits && code != SET_INTERNAL_OPTION && size < 8)) { // we expect the structure to contain at least the size and // version, 8 bytes total - ALOGE("b/27207275 (%zu)", size); + ALOGE("b/27207275 (%zu) (%d/%d)", size, int(index), int(code)); android_errorWriteLog(0x534e4554, "27207275"); } else { err = NO_MEMORY; |