sndioctl: Check control types and skip unknown ones

This commit is contained in:
Alexandre Ratchov 2020-06-28 07:52:52 +02:00
parent 7d0bfffd42
commit 97413ec614
1 changed files with 9 additions and 1 deletions

View File

@ -858,8 +858,16 @@ ondesc(void *arg, struct sioctl_desc *d, int curval)
}
}
if (d->type == SIOCTL_NONE)
switch (d->type) {
case SIOCTL_NUM:
case SIOCTL_SW:
case SIOCTL_VEC:
case SIOCTL_LIST:
case SIOCTL_SEL:
break;
default:
return;
}
/*
* find the right position to insert the new widget