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

Commit 0dac1009 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

DO NOT MERGE Fix AudioEffect reply overflow

am: 7ffa39c4

* commit '7ffa39c4':
  DO NOT MERGE Fix AudioEffect reply overflow

Change-Id: Ia43f0a917f458b1647000fa2e167af09c486139a
parents 34fa769a 7ffa39c4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -559,7 +559,9 @@ static int fx_command(effect_handle_t self,
            if (pCmdData == NULL ||
                    cmdSize < (int)sizeof(effect_param_t) ||
                    pReplyData == NULL ||
                    *replySize < (int)sizeof(effect_param_t)) {
                    *replySize < (int)sizeof(effect_param_t) ||
                    // constrain memcpy below
                    ((effect_param_t *)pCmdData)->psize > *replySize - sizeof(effect_param_t)) {
                ALOGV("fx_command() EFFECT_CMD_GET_PARAM invalid args");
                return -EINVAL;
            }