Fix memory corruption at user-controlled address in CdfmLoader::load()
Fix memory corruption at user-controlled address in CdfmLoader::load()

As Lionel mentioned in issue #102, unchecked data from the
input file is used to compute an index into the track array
which may be out of bounds. Now, as it is an array of pointers,
song data may be misinterpreted as a pointer if the rows are
allocated immediately after the track array. (If that's the
case depends on the implementation of the memory allocator.)
The attempt to set data for a pattern with an invalid number
may thus write from the file to an address determined by row
data read earlier from the file.

Stop the wild writes by checking the pattern number.

Fixes: https://github.com/adplug/adplug/issues/102
Reported-by: Lionel Debroux <26c7e3f068b1333d5ab848d51f681ede899c0aa2@yahoo.fr>

adplug/adplug,adplug/adplug