lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 04 Apr 2015 14:34:48 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: hda: fix possible null dereference

At Thu,  2 Apr 2015 16:51:43 +0530,
Sudip Mukherjee wrote:
> 
> we are dereferencing pcm first then checking pcm. instead now lets put
> them in same if condition so that pcm is checked first.
> 
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>

Applied, thanks.


Takashi

> ---
>  sound/pci/hda/hda_codec.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index 145cae7..7df18e2 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -3717,9 +3717,8 @@ static int add_std_chmaps(struct hda_codec *codec)
>  			struct snd_pcm_chmap *chmap;
>  			const struct snd_pcm_chmap_elem *elem;
>  
> -			if (pcm->own_chmap)
> -				continue;
> -			if (!pcm || !hinfo->substreams)
> +			if (!pcm || pcm->own_chmap ||
> +			    !hinfo->substreams)
>  				continue;
>  			elem = hinfo->chmap ? hinfo->chmap : snd_pcm_std_chmaps;
>  			err = snd_pcm_add_chmap_ctls(pcm->pcm, str, elem,
> -- 
> 1.8.1.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ