Regardless of whether an input file may be broken, it must not crash
the decoder.
diff -Nur audacious-plugins-fedora-2.2-orig/src/adplug/core/lds.cxx audacious-plugins-fedora-2.2-adplug-lds/src/adplug/core/lds.cxx
--- audacious-plugins-fedora-2.2-orig/src/adplug/core/lds.cxx 2009-11-22 23:49:52.000000000 +0100
+++ audacious-plugins-fedora-2.2-adplug-lds/src/adplug/core/lds.cxx 2010-01-25 19:09:28.000000000 +0100
@@ -665,6 +665,9 @@
void
CldsPlayer::playsound (int inst_number, int channel_number, int tunehigh)
{
+ if (inst_number > numpatch-1) {
+ return;
+ }
Channel *c = &channel[channel_number]; // current channel
SoundBank *i = &soundbank[inst_number]; // current instrument
unsigned int regnum = op_table[channel_number]; // channel's OPL2 register