summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/loader.c
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2024-04-05 11:09:22 +0200
committerMark Brown <broonie@kernel.org>2024-04-05 13:13:06 +0100
commit47714847592b574ff594ceca7ebe0ada70dbac3c (patch)
tree54a30eb7091971777bf603d0a3320884d52de0f4 /sound/soc/intel/avs/loader.c
parent9d2e26f31c7cc3fa495c423af9b4902ec0dc7be3 (diff)
ASoC: Intel: avs: Replace risky functions with safer variants
strscpy() and snprintf() are the recommended equivalents of their riskier friends. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240405090929.1184068-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs/loader.c')
-rw-r--r--sound/soc/intel/avs/loader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c
index 8e34d3536082..57370f0905dc 100644
--- a/sound/soc/intel/avs/loader.c
+++ b/sound/soc/intel/avs/loader.c
@@ -535,7 +535,7 @@ int avs_dsp_load_libraries(struct avs_dev *adev, struct avs_tplg_library *libs,
if (ret)
return ret;
- strncpy(adev->lib_names[id], man->name, AVS_LIB_NAME_SIZE);
+ strscpy(adev->lib_names[id], man->name, AVS_LIB_NAME_SIZE);
id++;
next_lib:
i++;
@@ -698,7 +698,7 @@ int avs_dsp_first_boot_firmware(struct avs_dev *adev)
}
/* basefw always occupies slot 0 */
- strcpy(&adev->lib_names[0][0], "BASEFW");
+ strscpy(adev->lib_names[0], "BASEFW", AVS_LIB_NAME_SIZE);
ida_init(&adev->ppl_ida);