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

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

Fix potential NULL dereference in Visualizer effect am: 874f9e0b am: f060479b

am: bcc7230b

Change-Id: If5d6fefb276341472d827bac3f349561f7d1d990
parents 54c0001d bcc7230b
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -602,9 +602,14 @@ int Visualizer_command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize,
    case VISUALIZER_CMD_MEASURE: {
        if (pReplyData == NULL || replySize == NULL ||
                *replySize < (sizeof(int32_t) * MEASUREMENT_COUNT)) {
            if (replySize == NULL) {
                ALOGV("VISUALIZER_CMD_MEASURE() error replySize NULL");
            } else {
                ALOGV("VISUALIZER_CMD_MEASURE() error *replySize %" PRIu32
                    " < (sizeof(int32_t) * MEASUREMENT_COUNT) %" PRIu32, *replySize,
                    sizeof(int32_t) * MEASUREMENT_COUNT);
                        " < (sizeof(int32_t) * MEASUREMENT_COUNT) %" PRIu32,
                        *replySize,
                        uint32_t(sizeof(int32_t)) * MEASUREMENT_COUNT);
            }
            android_errorWriteLog(0x534e4554, "30229821");
            return -EINVAL;
        }