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

Commit 3ee0f106 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "EffectProxy: Check offload reply size"

parents e73a2461 48946cd0
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;