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

Commit 322b7d98 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:...

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

Change-Id: Ie0c488d1fa14779bf64fc7310bd3407bb0880e8d
parents a140a552 c2846f34
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)) {