NULL pointer dereference in sound/synth/emux/soundfont.c
PATCH 1/1 NULL pointer dereference in sound/synth/emux/soundfont.c
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 <[email protected]>
sound/synth/emux/soundfont.c renamed from sound/synth/emux/soundfont.c.orig +1 -1
@@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *sbreak ;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 {
At Tue, 30 May 2006 22:18:16 +0200,
Quoted 9 lines · Eric Sesterhenn
hi,
this is about coverity id #100.
It seems the if statement is negated, since the else branch callsremove_info()withsflist->currsfas a parameter where it gets dereferenced.Signed-off-by Eric Sesterhenn <[email protected]>
Thanks, I applied it to ALSA tree.
Takashi
Quoted 14 lines
sound/synth/emux/soundfont.c renamed from sound/synth/emux/soundfont.c.orig +1
-1@@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *sbreak ;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 {