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

Commit 77062b4e authored by Jessica Wagantall's avatar Jessica Wagantall
Browse files

Merge tag 'android-6.0.1_r13' into HEAD

Android 6.0.1 release 13
Ticket: CYNGNOS-1522

Change-Id: Ie9d7be6df3e63138bafb892a3181446e3c7d844e
parents 96985edf 1e508ddc
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -325,7 +325,9 @@ status_t BnCrypto::onTransact(


            if (overflow || sumSubsampleSizes != totalSize) {
            if (overflow || sumSubsampleSizes != totalSize) {
                result = -EINVAL;
                result = -EINVAL;
            } else if (offset + totalSize > sharedBuffer->size()) {
            } else if (totalSize > sharedBuffer->size()) {
                result = -EINVAL;
            } else if ((size_t)offset > sharedBuffer->size() - totalSize) {
                result = -EINVAL;
                result = -EINVAL;
            } else {
            } else {
                result = decrypt(
                result = decrypt(
+9 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,10 @@


#include <inttypes.h>
#include <inttypes.h>


#ifndef INT32_MAX
#define INT32_MAX   2147483647
#endif

namespace android {
namespace android {


template<class T>
template<class T>
@@ -137,6 +141,11 @@ OMX_ERRORTYPE SoftMPEG4Encoder::initEncParams() {
    if (mColorFormat != OMX_COLOR_FormatYUV420Planar || mInputDataIsMeta) {
    if (mColorFormat != OMX_COLOR_FormatYUV420Planar || mInputDataIsMeta) {
        // Color conversion is needed.
        // Color conversion is needed.
        free(mInputFrameData);
        free(mInputFrameData);
        mInputFrameData = NULL;
        if (((uint64_t)mWidth * mHeight) > ((uint64_t)INT32_MAX / 3)) {
            ALOGE("b/25812794, Buffer size is too big.");
            return OMX_ErrorBadParameter;
        }
        mInputFrameData =
        mInputFrameData =
            (uint8_t *) malloc((mWidth * mHeight * 3 ) >> 1);
            (uint8_t *) malloc((mWidth * mHeight * 3 ) >> 1);
        CHECK(mInputFrameData != NULL);
        CHECK(mInputFrameData != NULL);
+9 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,10 @@
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaDefs.h>


#ifndef INT32_MAX
#define INT32_MAX   2147483647
#endif

namespace android {
namespace android {


template<class T>
template<class T>
@@ -315,6 +319,11 @@ status_t SoftVPXEncoder::initEncoder() {


    if (mColorFormat != OMX_COLOR_FormatYUV420Planar || mInputDataIsMeta) {
    if (mColorFormat != OMX_COLOR_FormatYUV420Planar || mInputDataIsMeta) {
        free(mConversionBuffer);
        free(mConversionBuffer);
        mConversionBuffer = NULL;
        if (((uint64_t)mWidth * mHeight) > ((uint64_t)INT32_MAX / 3)) {
            ALOGE("b/25812794, Buffer size is too big.");
            return UNKNOWN_ERROR;
        }
        mConversionBuffer = (uint8_t *)malloc(mWidth * mHeight * 3 / 2);
        mConversionBuffer = (uint8_t *)malloc(mWidth * mHeight * 3 / 2);
        if (mConversionBuffer == NULL) {
        if (mConversionBuffer == NULL) {
            ALOGE("Allocating conversion buffer failed.");
            ALOGE("Allocating conversion buffer failed.");