mailman.alsa-project.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Sound-open-firmware

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
sound-open-firmware@alsa-project.org

December 2023

  • 10 participants
  • 21 discussions
[PATCH] ASoC: SOF: Fix null pointer dereference in sof_pci_probe
by Kunwu Chan 04 Dec '23

04 Dec '23
devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 46207ca24545 ("ASoC: SOF: pci: change the default firmware path when the community key is used") Fixes: 25bbc0c59ee1 ("ASoC: SOF: Add path definition for external firmware libraries") Signed-off-by: Kunwu Chan <chentao(a)kylinos.cn> --- sound/soc/sof/sof-pci-dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 64b326e3ef85..75a9bfa5bfbe 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -282,6 +282,10 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) devm_kasprintf(dev, GFP_KERNEL, "%s/%s", sof_pdata->desc->default_fw_path[sof_pdata->ipc_type], "community"); + if (!sof_pdata->fw_filename_prefix) { + ret = -ENOMEM; + goto out; + } dev_dbg(dev, "Platform uses community key, changed fw path to %s\n", @@ -303,6 +307,10 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) devm_kasprintf(dev, GFP_KERNEL, "%s/%s", sof_pdata->desc->default_lib_path[sof_pdata->ipc_type], "community"); + if (!sof_pdata->fw_lib_prefix) { + ret = -ENOMEM; + goto out; + } dev_dbg(dev, "Platform uses community key, changed fw_lib path to %s\n", -- 2.34.1
2 1
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • Older →

HyperKitty Powered by HyperKitty version 1.3.8.