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:	Tue, 12 Mar 2013 08:34:55 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Wei Yongjun <weiyj.lk@...il.com>
Cc:	perex@...ex.cz, yongjun_wei@...ndmicro.com.cn,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: asihpi - fix potential NULL pointer dereference

At Tue, 12 Mar 2013 00:16:40 +0800,
Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> 
> The dereference should be moved below the NULL test.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Applied now.  Thanks.


Takashi

> ---
>  sound/pci/asihpi/asihpi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
> index 3536b07..0aabfed 100644
> --- a/sound/pci/asihpi/asihpi.c
> +++ b/sound/pci/asihpi/asihpi.c
> @@ -2549,7 +2549,7 @@ static int snd_asihpi_sampleclock_add(struct snd_card_asihpi *asihpi,
>  
>  static int snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
>  {
> -	struct snd_card *card = asihpi->card;
> +	struct snd_card *card;
>  	unsigned int idx = 0;
>  	unsigned int subindex = 0;
>  	int err;
> @@ -2557,6 +2557,7 @@ static int snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
>  
>  	if (snd_BUG_ON(!asihpi))
>  		return -EINVAL;
> +	card = asihpi->card;
>  	strcpy(card->mixername, "Asihpi Mixer");
>  
>  	err =
> 
> 
--
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