Skip to content

Commit

Permalink
Fix another potential Buffer overrun in sqWin32MIDI.c
Browse files Browse the repository at this point in the history
The joy of 0-based indices...
[skip travis]
  • Loading branch information
nicolas-cellier-aka-nice committed Jan 2, 2019
1 parent bf3840c commit 252e2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c
Expand Up @@ -605,7 +605,7 @@ int finishSysExCommand(sqMidiPort *port, char *bufferPtr, int count)
/* Return the port with the given number or NULL */
static sqMidiPort* GetPort(int portNum)
{
if(portNum > MAX_DEVICES || portNum < 0)
if(portNum >= MAX_DEVICES || portNum < 0)
{
success(false);
return NULL;
Expand Down

0 comments on commit 252e2a8

Please sign in to comment.