From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964943AbWEaJ4n (ORCPT ); Wed, 31 May 2006 05:56:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964947AbWEaJ4n (ORCPT ); Wed, 31 May 2006 05:56:43 -0400 Received: from ns2.suse.de ([195.135.220.15]:41877 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S964943AbWEaJ4m (ORCPT ); Wed, 31 May 2006 05:56:42 -0400 Date: Wed, 31 May 2006 11:56:41 +0200 Message-ID: From: Takashi Iwai To: Eric Sesterhenn Cc: LKML Subject: Re: [Patch] NULL pointer dereference in sound/synth/emux/soundfont.c In-Reply-To: <1149020296.29430.4.camel@alice> References: <1149020296.29430.4.camel@alice> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 30 May 2006 22:18:16 +0200, Eric Sesterhenn wrote: > > 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 Thanks, I applied it to ALSA tree. Takashi > > --- 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 { > >