Fix NULL dereference in OSS v_midi driver
PATCH 1/1 Fix NULL dereference in OSS v_midi driver
Spotted with the source checker from Coverity.com.
sound/oss/v_midi.c +3 -2
@@ -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 ;
Quoted 1 line · Dave Jones
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
Quoted 7 lines · Herbert Poetzl
Quoted 1 line · Dave Jones
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.
Quoted 2 lines
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