Commit cd59d678 authored by Stéphane Letz's avatar Stéphane Letz
Browse files

Merge pull request #128 from maksqwe/jack_midi_event_write_fix

Fix buf nullptr dereferencing in jack_midi_event_write()
parents b5bceb50 a4b59f66
......@@ -134,7 +134,7 @@ int jack_midi_event_write(void* port_buffer,
jack_nframes_t time, const jack_midi_data_t* data, size_t data_size)
{
JackMidiBuffer *buf = (JackMidiBuffer*)port_buffer;
if (!buf && !buf->IsValid()) {
if (!buf || !buf->IsValid()) {
return -EINVAL;
}
if (time >= buf->nframes || (buf->event_count && buf->events[buf->event_count - 1].time > time)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment