Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt1320: fix the warning the string may be truncated
@ 2025-12-22 10:13 shumingf
  2025-12-22 19:40 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: shumingf @ 2025-12-22 10:13 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
	Shuming Fan, kernel test robot

From: Shuming Fan <shumingf@realtek.com>

1488 |                          "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku);
     |                                                 ^~             ~~~~~~
sound/soc/codecs/rt1320-sdw.c:1487:17: note: 'snprintf' output between 29 and 410 bytes into a destination of size 128
1487 |                 snprintf(filename, sizeof(filename),
     |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1488 |                          "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku);
     |

Fixes: da1682d5e8b5 ("ASoC: rt1320: support calibration and temperature/r0 loading")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512191521.RK0edKdX-lkp@intel.com/
Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
 sound/soc/codecs/rt1320-sdw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 9447e742c672..4c3756940ae2 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -1435,7 +1435,7 @@ static int rt1320_rae_load(struct rt1320_sdw_priv *rt1320)
 	const char *dmi_vendor, *dmi_product, *dmi_sku;
 	char vendor[128], product[128], sku[128];
 	char *ptr_vendor, *ptr_product, *ptr_sku;
-	char rae_filename[128];
+	char rae_filename[512];
 	char tag[5];
 	int ret = 0;
 	int retry = 200;
@@ -1602,7 +1602,7 @@ struct rt1320_dspfwheader {
 	const char *dmi_vendor, *dmi_product, *dmi_sku;
 	char vendor[128], product[128], sku[128];
 	char *ptr_vendor, *ptr_product, *ptr_sku;
-	char filename[128];
+	char filename[512];
 
 	switch (rt1320->dev_id) {
 	case RT1320_DEV_ID:
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: rt1320: fix the warning the string may be truncated
  2025-12-22 10:13 [PATCH] ASoC: rt1320: fix the warning the string may be truncated shumingf
@ 2025-12-22 19:40 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-12-22 19:40 UTC (permalink / raw)
  To: lgirdwood, shumingf
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
	kernel test robot

On Mon, 22 Dec 2025 18:13:29 +0800, shumingf@realtek.com wrote:
> 1488 |                          "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku);
>      |                                                 ^~             ~~~~~~
> sound/soc/codecs/rt1320-sdw.c:1487:17: note: 'snprintf' output between 29 and 410 bytes into a destination of size 128
> 1487 |                 snprintf(filename, sizeof(filename),
>      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1488 |                          "realtek/rt1320/rt1320_%s_%s_%s.dat", vendor, product, sku);
>      |
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt1320: fix the warning the string may be truncated
      commit: 8db50f0fa43efe8799fd40b872dcdd39a90d7549

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-22 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22 10:13 [PATCH] ASoC: rt1320: fix the warning the string may be truncated shumingf
2025-12-22 19:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox