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:
parent
664a4fee3d
commit
ee10431307
@ -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 (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user