public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: tiwai@suse.de
Subject: [Patch] NULL pointer dereference in sound/synth/emux/soundfont.c
Date: Tue, 30 May 2006 22:18:16 +0200	[thread overview]
Message-ID: <1149020296.29430.4.camel@alice> (raw)

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@gmx.de>

--- 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 {



             reply	other threads:[~2006-05-30 20:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-30 20:18 Eric Sesterhenn [this message]
2006-05-31  9:56 ` [Patch] NULL pointer dereference in sound/synth/emux/soundfont.c Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1149020296.29430.4.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox