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

Commit 48946cd0 authored by Andy Hung's avatar Andy Hung
Browse files

EffectProxy: Check offload reply size

Test: Custom test case
Bug: 32448121
Change-Id: Iacdd84097f897e86a188ab6831fd0e11738973d1
parent d72ffc44
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -236,6 +236,11 @@ int Effect_command(effect_handle_t self,
    // pCmdData points to a memory holding effect_offload_param_t structure
    if (cmdCode == EFFECT_CMD_OFFLOAD) {
        ALOGV("Effect_command() cmdCode = EFFECT_CMD_OFFLOAD");
        if (replySize == NULL || *replySize < sizeof(int)) {
            ALOGV("effectsOffload: Effect_command: CMD_OFFLOAD has no reply");
            android_errorWriteLog(0x534e4554, "32448121");
            return FAILED_TRANSACTION;
        }
        if (cmdSize == 0 || pCmdData == NULL) {
            ALOGV("effectsOffload: Effect_command: CMD_OFFLOAD has no data");
             *(int*)pReplyData = FAILED_TRANSACTION;