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

Skip to content
Snippets Groups Projects
Commit 3d89d0bf authored by Andy Hung's avatar Andy Hung Committed by Jessica Wagantall
Browse files

Check effect command reply size in AudioFlinger

Ticket: CYNGNOS-3177

Bug: 29251553
Change-Id: I1bcc1281f1f0542bb645f6358ce31631f2a8ffbf
(cherry picked from commit 110bc954)
parent 05d30174
Branches
No related tags found
No related merge requests found
...@@ -640,6 +640,12 @@ status_t AudioFlinger::EffectModule::command(uint32_t cmdCode, ...@@ -640,6 +640,12 @@ status_t AudioFlinger::EffectModule::command(uint32_t cmdCode,
if (mStatus != NO_ERROR) { if (mStatus != NO_ERROR) {
return mStatus; return mStatus;
} }
if (cmdCode == EFFECT_CMD_GET_PARAM &&
(*replySize < sizeof(effect_param_t) ||
((effect_param_t *)pCmdData)->psize > *replySize - sizeof(effect_param_t))) {
android_errorWriteLog(0x534e4554, "29251553");
return -EINVAL;
}
status_t status = (*mEffectInterface)->command(mEffectInterface, status_t status = (*mEffectInterface)->command(mEffectInterface,
cmdCode, cmdCode,
cmdSize, cmdSize,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment