Skip to content

Commit

Permalink
Fixed uninitialized memory access (thanks Ozkan!)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 18, 2017
1 parent a34091c commit d424038
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions timidity/readmidi.c
Expand Up @@ -540,9 +540,7 @@ MidiEvent *read_midi_file(MidiSong *song, Sint32 *count, Sint32 *sp)

/* Put a do-nothing event first in the list for easier processing */
song->evlist=safe_malloc(sizeof(MidiEventList));
song->evlist->event.time=0;
song->evlist->event.type=ME_NONE;
song->evlist->next=0;
memset(song->evlist, 0, sizeof(MidiEventList));
song->event_count++;

switch(format)
Expand Down

0 comments on commit d424038

Please sign in to comment.