[PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference
crimsun at fungus.sh.nu
crimsun at fungus.sh.nu
Fri Jun 2 21:16:39 UTC 2006
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 at ubuntu.com>
Signed-off-by: Eric Sesterhenn <snakebyte at gmx.de>
---
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 at ubuntu.com
GPG key: www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060602/18594117/attachment.sig>
More information about the kernel-team
mailing list