[alsa-devel] [PATCH] ASoC: dapm: Fix empty list check in dapm_new_mux()

Mark Brown broonie at kernel.org
Thu Aug 1 20:44:27 CEST 2013


On Thu, Aug 01, 2013 at 06:30:38PM +0200, Lars-Peter Clausen wrote:
> list_first_entry() will always return a valid pointer, even if the list is
> empty. So the check whether path is NULL will always be false. So we end up
> calling dapm_create_or_share_mixmux_kcontrol() with a path struct that points
> right in the middle of the widget struct and by trying to modify the path the
> widgets memory will become corrupted. Fix this by using list_emtpy() to check if
> the widget doesn't have any paths.

Applied, thanks - looking at this I'm surprised we've not been running
into problems before.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130801/584d5f15/attachment.sig>


More information about the Alsa-devel mailing list