m0j0hn / editor-on-fire

Automatically exported from code.google.com/p/editor-on-fire
Other
0 stars 0 forks source link

Various improvements for MIDI import #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Left over observations from issue 123, not critical, but still valid:

ptotal_events is only incremented for events that are interesting, making the 
percent counter inaccurate.  It could probably be incremented for all events as 
long as the switch's default case (unidentified event) is not reached.

The text/lyric event import logic has a weakness in that if the text is >= 256 
characters long, it could cause a buffer overflow.

Original issue reported on code.google.com by raynebc on 15 Aug 2010 at 7:24

GoogleCodeExporter commented 9 years ago
r302 should theoretically perform the bounds checking to prevent the buffer 
overflow, but I'm not sure it's actually doing anything.  It couldn't hurt, I 
suppose.

Original comment by raynebc on 17 Aug 2010 at 8:01

GoogleCodeExporter commented 9 years ago
r320 should eliminate the risk of the buffer overflow, as 
eof_midi_import_add_text_event() now has overflow prevention logic.

A previous revision also updated the handling of the ptotal_events counter.

Original comment by raynebc on 23 Aug 2010 at 5:50