Re: [PATCH 2/2] ASoC: Intel: sst: Replace deprecated strcpy in sst_acpi_probe
From: Cezary Rojewski
Date: Wed Nov 12 2025 - 06:41:14 EST
On 2025-11-11 11:47 PM, Thorsten Blum wrote:
strcpy() is deprecated; use the safer strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
sound/soc/intel/atom/sst/sst_acpi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index 257180630475..73624e1b138a 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -12,6 +12,7 @@
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
+#include <linux/string.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/firmware.h>
@@ -356,7 +357,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
/* Fill sst platform data */
ctx->pdata = pdata;
- strcpy(ctx->firmware_name, mach->fw_filename);
+ strscpy(ctx->firmware_name, mach->fw_filename);
ret = sst_platform_get_resources(ctx);
if (ret)
Thank you for the fix. I'd update the title though as 'sst' is confusing. It stands for Smart Sound Technology and applies to most things sound/soc/intel/*.
Go with either 'ASoC: Intel: atom: sst: ' or just 'ASoC: Intel: atom: '. In fact, I'd just merge the two patches together given that both address one driver - Intel atom sound driver.
Given that this is a small change, feel free to append in v2:
Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>