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

Commit de98d9b7 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

fix possible overflow in effect wrappers. am: 9e29523b am: baebc739 am:...

fix possible overflow in effect wrappers. am: 9e29523b am: baebc739 am: 3a9d4f4a am: 5b7c20dd am: df81fc3f am: 68e43cf1 am: b1338d3c am: 440c9e9b
am: 9950df25

* commit '9950df25':
  fix possible overflow in effect wrappers.
parents 2b8d26ba 9950df25
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3091,7 +3091,10 @@ int Effect_command(effect_handle_t self,
            //ALOGV("\tEffect_command cmdCode Case: EFFECT_CMD_GET_PARAM start");

            effect_param_t *p = (effect_param_t *)pCmdData;

            if (SIZE_MAX - sizeof(effect_param_t) < (size_t)p->psize) {
                android_errorWriteLog(0x534e4554, "26347509");
                return -EINVAL;
            }
            if (pCmdData == NULL || cmdSize < sizeof(effect_param_t) ||
                    cmdSize < (sizeof(effect_param_t) + p->psize) ||
                    pReplyData == NULL || replySize == NULL ||
+4 −1
Original line number Diff line number Diff line
@@ -1956,7 +1956,10 @@ int Reverb_command(effect_handle_t self,
            //ALOGV("\tReverb_command cmdCode Case: "
            //        "EFFECT_CMD_GET_PARAM start");
            effect_param_t *p = (effect_param_t *)pCmdData;

            if (SIZE_MAX - sizeof(effect_param_t) < (size_t)p->psize) {
                android_errorWriteLog(0x534e4554, "26347509");
                return -EINVAL;
            }
            if (pCmdData == NULL || cmdSize < sizeof(effect_param_t) ||
                    cmdSize < (sizeof(effect_param_t) + p->psize) ||
                    pReplyData == NULL || replySize == NULL ||