ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present()
Subsystems (3)
PATCH 1/1 ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present()
Check the return value of kzalloc() and exit early to avoid a potential NULL pointer dereference.
--- sound/soc/sdw_utils/soc_sdw_utils.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/sdw_utils/soc_sdw_utils.c +2 -0
@@ -1180,6 +1180,8 @@ static int is_sdca_endpoint_present(struct device *dev,int i; dlc =kzalloc (sizeof (*dlc),GFP_KERNEL ); +if (!dlc) +return -ENOMEM ; adr_end = &adr_dev->endpoints[end_index]; dai_info = &codec_info->dais[adr_end->num];
Signature · 1 line
2.49.0
Quoted 7 lines · Thorsten Blum
Check the return value of
kzalloc()and exit early to avoid a potential NULL pointer dereference.Fixes 4f8ef33dd44a ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present")Signed-off-by Thorsten Blum <[email protected]>---
Thanks,
Charles
Mark Brown
maintainerQuoted 4 lines · Thorsten Blum
Check the return value of
kzalloc()and exit early to avoid a potential NULL pointer dereference.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present()
commit: 6325766d69900d1aa9733fc7572456fc4427b708
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