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

Commit b67c5df3 authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "Fix for potential NULL de-reference issue in Reverb" am: a1ce4cb5

Change-Id: I89369c3f1329495092ba1d700b94584065e9c4ff
parents 3d1b49f4 a1ce4cb5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1906,11 +1906,15 @@ 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 (pCmdData == nullptr) {
                ALOGW("\tLVM_ERROR : pCmdData is NULL");
                return -EINVAL;
            }
            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) ||
            if (cmdSize < sizeof(effect_param_t) ||
                    cmdSize < (sizeof(effect_param_t) + p->psize) ||
                    pReplyData == NULL || replySize == NULL ||
                    *replySize < (sizeof(effect_param_t) + p->psize)) {