From: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
To: tiwai@suse.de
Cc: perex@perex.cz, linux-sound@vger.kernel.org, lkp@intel.com,
Lucy Thrun <lucy.thrun@digital-rabbithole.de>
Subject: [PATCH 2/2] ALSA: hda/ca0132: Fix possible buffer overflow with snprintf
Date: Tue, 10 Jun 2025 14:24:38 +0200 [thread overview]
Message-ID: <20250610122438.820-2-lucy.thrun@digital-rabbithole.de> (raw)
In-Reply-To: <20250610122438.820-1-lucy.thrun@digital-rabbithole.de>
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506100642.95jpuMY1-lkp@intel.com/
Signed-off-by: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
---
sound/pci/hda/patch_ca0132.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 491d45d652dd..1904964591db 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -4410,7 +4410,7 @@ static int add_tuning_control(struct hda_codec *codec,
}
knew.private_value =
HDA_COMPOSE_AMP_VAL(nid, 1, 0, type);
- sprintf(namestr, "%s %s Volume", name, dirstr[dir]);
+ snprintf(namestr, sizeof(namestr), "%s %s Volume", name, dirstr[dir]);
return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
}
--
2.45.1.windows.1
next prev parent reply other threads:[~2025-06-10 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 12:24 [PATCH 1/2] ALSA: hda/ca0132: Use NULL instead of 0 for pointer assignment Lucy Thrun
2025-06-10 12:24 ` Lucy Thrun [this message]
2025-06-10 15:55 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250610122438.820-2-lucy.thrun@digital-rabbithole.de \
--to=lucy.thrun@digital-rabbithole.de \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox