Crash on importing of an incorrect MIDI file
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
Because it's a crash.
See https://github.com/musescore/MuseScore/pull/2990
Bug reported for 2.0.2, so fix needed tor 2.1 branch too
Fixed in branch master, commit a9c69f44c7
Fix #171071: crash when importing incorrect MIDI file
Fixed in branch 2.1, commit 548344baa5
Fix #171071: crash when importing incorrect MIDI file
Automatically closed -- issue fixed for 2 weeks with no activity.