mixedinkey-opensource/MIKMIDI — pull request #23 by computersarehard (2014-08-14 06:14:41+00:00)
Title: Issue #22: Dynamically allocate MIDIPacketLists to ensure space for all ...

...commands.

The previous code directly used stack allocation of the defined MIDIPacketList
structure. This default structure only allows for 256 data bytes. If an array of
MIKMIDICommands was sent that required more space an error would occur.

The fix is to make MIKMIDIPacketListFromCommands dynamically allocate the
appropriate amount of memory by computing the needed size and returning a
reference through a pointer parameter. These changes do modify the signature of
MIKMIDIPacketListFromCommands so any uses outside of MIKMIDICommand must be
updated.