Skip to contentSkip to conversation

ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy()

PATCH Applied Thorsten Blum 2 participants 2 messages May 9, 2025 – May 11, 2025 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: intel-hdmi-audio: Replace deprecated strcpy() with strscpy()

strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

---
 sound/x86/intel_hdmi_audio.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/x86/intel_hdmi_audio.c +4 -3
index 7fcc528a0204..fe5cb4139088 100644
@@ -22,6 +22,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 #include <sound/core.h>
 #include <sound/asoundef.h>
 #include <sound/pcm.h>
@@ -1698,9 +1699,9 @@ static int __hdmi_lpe_audio_probe(struct platform_device *pdev)
 	card_ctx = card->private_data;
 	card_ctx->dev = &pdev->dev;
 	card_ctx->card = card;
-	strcpy(card->driver, INTEL_HAD);
-	strcpy(card->shortname, "Intel HDMI/DP LPE Audio");
-	strcpy(card->longname, "Intel HDMI/DP LPE Audio");
+	strscpy(card->driver, INTEL_HAD);
+	strscpy(card->shortname, "Intel HDMI/DP LPE Audio");
+	strscpy(card->longname, "Intel HDMI/DP LPE Audio");
 
 	card_ctx->irq = -1;
 
Signature · 1 line
2.49.0