Subject: [PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference
UpstreamStatus: Added in upstream hg alsa-kernel changeset 96e63842ba5d
http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=96e63842ba5d73628efab9a051e42a28c38301e8;style=raw
Takashi Iwai committed this fix from Eric Sesterhenn for Coverity #100
with the following context:
"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: Daniel T Chen <crimsun@xxxxxxxxxx>
Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
---
sound/synth/emux/soundfont.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
eaa795dd34daa57d78654abb5278c1bd7e23d7a3
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
index d0925ea..ebbc2a7 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -183,7 +183,7 @@ snd_soundfont_load(snd_sf_list_t *sflist
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 {
--
1.1.3
--
Daniel T. Chen crimsun@xxxxxxxxxx
GPG key: www.sh.nu/~crimsun/pubkey.gpg.asc
pgpPDlVvjnqCN.pgp
Description: PGP signature
|