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

Commit b53ab34b authored by Marco Nelissen's avatar Marco Nelissen
Browse files

resolve merge conflicts of edb14117 to nyc-dev

Change-Id: If4c4a68dff17a238673f5f11d790229e0459fda0
parents 58fb7c6e edb14117
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <binder/Parcel.h>
#include <media/IOMX.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/openmax/OMX_IndexExt.h>

namespace android {

@@ -717,7 +718,8 @@ status_t BnOMX::onTransact(
            void *params = NULL;
            size_t pageSize = 0;
            size_t allocSize = 0;
            if (code != SET_INTERNAL_OPTION && size < 8) {
            if ((index == (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits && size < 4) ||
                    (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);
@@ -739,7 +741,9 @@ status_t BnOMX::onTransact(
                    } else {
                        err = NOT_ENOUGH_DATA;
                        OMX_U32 declaredSize = *(OMX_U32*)params;
                        if (code != SET_INTERNAL_OPTION && declaredSize > size) {
                        if (code != SET_INTERNAL_OPTION &&
                                index != (OMX_INDEXTYPE) OMX_IndexParamConsumerUsageBits &&
                                declaredSize > size) {
                            // the buffer says it's bigger than it actually is
                            ALOGE("b/27207275 (%u/%zu)", declaredSize, size);
                            android_errorWriteLog(0x534e4554, "27207275");