1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00

fix check of out-of-bounds value

This commit is contained in:
Alexandre Ratchov 2016-04-08 20:32:43 +02:00
parent 664a4fee3d
commit ee10431307

View File

@ -2117,7 +2117,7 @@ dev_setctl(struct dev *d, int addr, int val)
struct ctl *c;
int num;
if (val < 0 && val >= MIDI_MAXCTL)
if (val < 0 || val >= MIDI_MAXCTL)
return 0;
c = d->ctl_list;
for (;;) {