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

Commit ba7f90f8 authored by Divya Narayanan Poojary's avatar Divya Narayanan Poojary
Browse files

hal: fix for KW issues.

- Handle array bound violations

Change-Id: Ia6b2e184e8f4e133f91889afb8e1b8f3213ab7f0
parent 322bbfb6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3203,6 +3203,10 @@ int platform_set_channel_map(void *platform, int ch_count, char *ch_map, int snd
        ALOGE("%s: Invalid channel mapping used", __func__);
        return -EINVAL;
    }
    if ((ch_count < 1) || ch_count > FCC_8) {
        ALOGE("%s: Channel count %d out of range",__func__,ch_count);
        return -EINVAL;
    }
    strlcpy(mixer_ctl_name, "Playback Channel Map", sizeof(mixer_ctl_name));
    if (snd_id >= 0) {
        snprintf(device_num, sizeof(device_num), "%d", snd_id);