Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8777bfb0 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Fix OMX_IndexParamConsumerUsageBits size check am: 788b0b65

am: 63002afe

* commit '63002afe':
  Fix OMX_IndexParamConsumerUsageBits size check
parents a7706ab4 63002afe
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;