logo       

[PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference: msg#00006

Subject: [PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference
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

Attachment: pgpPDlVvjnqCN.pgp
Description: PGP signature


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe