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

Commit 7ffa39c4 authored by Andy Hung's avatar Andy Hung
Browse files

DO NOT MERGE Fix AudioEffect reply overflow

Bug: 28173666
Change-Id: I055af37a721b20c5da0f1ec4b02f630dcd5aee02
parent 34fa769a
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;
            }