Re: [Patch] NULL pointer dereference in sound/synth/emux/soundfont.c

From: Takashi Iwai
Date: Wed May 31 2006 - 05:55:47 EST


At Tue, 30 May 2006 22:18:16 +0200,
Eric Sesterhenn wrote:
>
> hi,
>
> this is about coverity id #100.
> It seems the if statement is negated, since the else branch calls
> remove_info() with sflist->currsf as a parameter where it gets
> dereferenced.
>
> Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>

Thanks, I applied it to ALSA tree.


Takashi

>
> --- linux-2.6.17-rc4-git2/sound/synth/emux/soundfont.c.orig 2006-05-30 22:08:40.000000000 +0200
> +++ linux-2.6.17-rc4-git2/sound/synth/emux/soundfont.c 2006-05-30 22:08:51.000000000 +0200
> @@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *s
> break;
> case SNDRV_SFNT_REMOVE_INFO:
> /* patch must be opened */
> - if (sflist->currsf) {
> + if (!sflist->currsf) {
> snd_printk("soundfont: remove_info: patch not opened\n");
> rc = -EINVAL;
> } else {
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/