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

Commit c2846f34 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 am: b67c5df3

Change-Id: Iec2ec4ee2795ab294898fc29ae8838e06537e868
parents 61384904 b67c5df3
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)) {