Message ID | 20241228071920.3252-1-tanyaagarwal25699@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ALSA: usb-audio: US16x08: Initialize array before use | expand |
> Initialize array before use in mixer_us16x08.c to prevent the > issues related to uninitialized memory access. … * You may occasionally put more than 61 characters into text lines of such a change description. * How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.13-rc4#n145 Regards, Markus
diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c index 6eb7d93b358d..20ac32635f1f 100644 --- a/sound/usb/mixer_us16x08.c +++ b/sound/usb/mixer_us16x08.c @@ -687,7 +687,7 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol, struct usb_mixer_elem_info *elem = kcontrol->private_data; struct snd_usb_audio *chip = elem->head.mixer->chip; struct snd_us16x08_meter_store *store = elem->private_data; - u8 meter_urb[64]; + u8 meter_urb[64] = {0}; switch (kcontrol->private_value) { case 0: {