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

Commit dc3ca4ac authored by rago's avatar rago Committed by android-build-merger
Browse files

Fix potential NULL dereference in Visualizer effect am: 0c39abc4 am:...

Fix potential NULL dereference in Visualizer effect am: 0c39abc4 am: 18b2de20 am: bcd048ae am: 67c5eb20 am: 996c0f33 am: ae2849ff am: b69cec19 am: e8b78f62 am: a8f0a1ff
am: bd78fe1f

Change-Id: I96d6511ec7f6bf75f9d70c922bd580481d88fcf9
parents 15d69ba5 bd78fe1f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -869,9 +869,13 @@ int visualizer_command(effect_context_t * context, uint32_t cmdCode, uint32_t cm
    case VISUALIZER_CMD_MEASURE: {
        if (pReplyData == NULL || replySize == NULL ||
                *replySize < (sizeof(int32_t) * MEASUREMENT_COUNT)) {
            ALOGV("%s VISUALIZER_CMD_MEASURE error *replySize %d <"
                    "(sizeof(int32_t) * MEASUREMENT_COUNT) %d",
            if (replySize == NULL) {
                ALOGV("%s VISUALIZER_CMD_MEASURE error replySize NULL", __func__);
            } else {
                ALOGV("%s VISUALIZER_CMD_MEASURE error *replySize %u <"
                        "(sizeof(int32_t) * MEASUREMENT_COUNT) %zu",
                        __func__, *replySize, sizeof(int32_t) * MEASUREMENT_COUNT);
            }
            android_errorWriteLog(0x534e4554, "30229821");
            return -EINVAL;
        }