From: Dave Jones <davej@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix NULL dereference in OSS v_midi driver
Date: Wed, 1 Sep 2004 16:51:23 +0100 [thread overview]
Message-ID: <200409011551.i81FpNha000690@delerium.codemonkey.org.uk> (raw)
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;
next reply other threads:[~2004-09-01 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-01 15:51 Dave Jones [this message]
2004-09-07 15:52 ` Herbert Poetzl
2004-09-08 23:18 ` Dave Jones
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=200409011551.i81FpNha000690@delerium.codemonkey.org.uk \
--to=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®