Crash on importing of an incorrect MIDI file

• Feb 9, 2017 - 19:37
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

1. Open MIDI file ba_bran3.mid or cest-ecrit.kar
2. Crash (Linux, Kubuntu 14.04, 64 bit)

Crash is in midi/midifile.cpp in functions
bool MidiFile::read(QIODevice* in) -> void MidiFile::skip(qint64 len)

int len = readLong(); => 100731768 - is incorrect length value.

Notation software Notation Player prints the error "Normal end of MIDI file not found".

Saw the same crash in Musescore 2.0.2.

Attachment Size
incorrect_midi_file_crash.png 135.29 KB
ba_bran3.mid 122.74 KB
cest-ecrit.kar 12.15 KB

Comments