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

Commit 91eb3ed2 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Fix OMX_IndexParamConsumerUsageBits size check am: 788b0b65 am: 63002afe am: 8777bfb0 am: b7bd8410

am: 7b5795dc

* commit '7b5795dc':
  Fix OMX_IndexParamConsumerUsageBits size check
parents 1c0e4807 7b5795dc
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -718,11 +718,12 @@ status_t BnOMX::onTransact(
            void *params = NULL;
            void *params = NULL;
            size_t pageSize = 0;
            size_t pageSize = 0;
            size_t allocSize = 0;
            size_t allocSize = 0;
            if ((index == (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits && size < 4) ||
            bool isUsageBits = (index == (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits);
                    (code != SET_INTERNAL_OPTION && size < 8)) {
            if ((isUsageBits && size < 4) ||
                    (!isUsageBits && code != SET_INTERNAL_OPTION && size < 8)) {
                // we expect the structure to contain at least the size and
                // we expect the structure to contain at least the size and
                // version, 8 bytes total
                // version, 8 bytes total
                ALOGE("b/27207275 (%zu)", size);
                ALOGE("b/27207275 (%zu) (%d/%d)", size, int(index), int(code));
                android_errorWriteLog(0x534e4554, "27207275");
                android_errorWriteLog(0x534e4554, "27207275");
            } else {
            } else {
                err = NO_MEMORY;
                err = NO_MEMORY;