public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix NULL dereference in OSS v_midi driver
@ 2004-09-01 15:51 Dave Jones
  2004-09-07 15:52 ` Herbert Poetzl
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2004-09-01 15:51 UTC (permalink / raw)
  To: linux-kernel

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/sound/oss/v_midi.c linux-2.6/sound/oss/v_midi.c
--- bk-linus/sound/oss/v_midi.c	2004-06-03 13:40:31.000000000 +0100
+++ linux-2.6/sound/oss/v_midi.c	2004-06-03 13:43:00.000000000 +0100
@@ -90,11 +90,12 @@ static void v_midi_close (int dev)
 static int v_midi_out (int dev, unsigned char midi_byte)
 {
 	vmidi_devc *devc = midi_devs[dev]->devc;
-	vmidi_devc *pdevc = midi_devs[devc->pair_mididev]->devc;
+	vmidi_devc *pdevc;
 
 	if (devc == NULL)
-		return -(ENXIO);
+		return -ENXIO;
 
+	pdevc = midi_devs[devc->pair_mididev]->devc;
 	if (pdevc->input_opened > 0){
 		if (MIDIbuf_avail(pdevc->my_mididev) > 500)
 			return 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix NULL dereference in OSS v_midi driver
  2004-09-01 15:51 [PATCH] Fix NULL dereference in OSS v_midi driver Dave Jones
@ 2004-09-07 15:52 ` Herbert Poetzl
  2004-09-08 23:18   ` Dave Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Poetzl @ 2004-09-07 15:52 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-kernel

On Wed, Sep 01, 2004 at 04:51:23PM +0100, Dave Jones wrote:
> Spotted with the source checker from Coverity.com.

apologies for the OT question:

how do you get the code checked with the source code
checker from Coverity.com? 

and would it be possible to have other kernel branches
or specific kernel patches checked too?

TIA,
Herbert


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix NULL dereference in OSS v_midi driver
  2004-09-07 15:52 ` Herbert Poetzl
@ 2004-09-08 23:18   ` Dave Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2004-09-08 23:18 UTC (permalink / raw)
  To: linux-kernel

On Tue, Sep 07, 2004 at 05:52:40PM +0200, Herbert Poetzl wrote:
 > On Wed, Sep 01, 2004 at 04:51:23PM +0100, Dave Jones wrote:
 > > Spotted with the source checker from Coverity.com.
 > 
 > apologies for the OT question:
 > 
 > how do you get the code checked with the source code
 > checker from Coverity.com? 

AFAIK, the current results are run on a vanilla 2.6.4 tree.

 > and would it be possible to have other kernel branches
 > or specific kernel patches checked too?

I've asked them if they'd rerun the tests on something more
recent a few times, but they've other more important things
to do it seems.

		Dave


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-08 23:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-01 15:51 [PATCH] Fix NULL dereference in OSS v_midi driver Dave Jones
2004-09-07 15:52 ` Herbert Poetzl
2004-09-08 23:18   ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox