patch-pre2.0.11 linux/drivers/sound/sequencer.c

Next file: linux/fs/Config.in
Previous file: linux/drivers/sound/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.10/linux/drivers/sound/sequencer.c linux/drivers/sound/sequencer.c
@@ -926,6 +926,9 @@
 
 	  dev = q[2];
 
+	  if (dev < 0 || dev >= num_midis)
+	     break;
+
 	  if (!midi_devs[dev]->putc (dev, q[1]))
 	    {
 	      /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this