* [PATCH] ALSA: usb-audio: US16x08: Initialize array before use
@ 2024-12-28 7:03 Tanya Agarwal
0 siblings, 0 replies; 2+ messages in thread
From: Tanya Agarwal @ 2024-12-28 7:03 UTC (permalink / raw)
To: perex, tiwai
Cc: linux-sound, linux-kernel, skhan, anupnewsmail, tanyaagarwal25699
From: Tanya Agarwal <tanyaagarwal25699@gmail.com>
Initialize array before use in mixer_us16x08.c to prevent the
issues related to uninitialized memory access.
CID 1410197: (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value *meter_urb when
calling get_meter_levels_from_urb
Coverity Link:
https://scan7.scan.coverity.com/#/project-view/52849/11354?selectedIssue=1410197
Signed-off-by: Tanya Agarwal <tanyaagarwal25699@gmail.com>
---
sound/usb/mixer_us16x08.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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: {
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: usb-audio: US16x08: Initialize array before use
[not found] <20241228071920.3252-1-tanyaagarwal25699@gmail.com>
@ 2024-12-28 17:49 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2024-12-28 17:49 UTC (permalink / raw)
To: Tanya Agarwal, linux-sound, Jaroslav Kysela, Takashi Iwai
Cc: linux-kernel, linux-security-module, Anup Sharma, James Morris,
Kees Cook, Paul Moore, Serge E. Hallyn, Shuah Khan, YueHaibing
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-28 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241228071920.3252-1-tanyaagarwal25699@gmail.com>
2024-12-28 17:49 ` [PATCH] ALSA: usb-audio: US16x08: Initialize array before use Markus Elfring
2024-12-28 7:03 Tanya Agarwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox