aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholbrcholberton@gmail.com>2020-08-12 23:06:08 -0500
committerTaylor Holberton <taylorcholbrcholberton@gmail.com>2020-08-12 23:06:08 -0500
commitfd59e16f1893d8b49b0fae421d09df7161b52616 (patch)
treee421787a580e8c1373205358d55b0ee1060cc3fc /src
parent3babe970a82180ee7b608bccef5cfcc1d0802a61 (diff)
Fixed boundary check for enum
Diffstat (limited to 'src')
-rw-r--r--src/mixer_plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mixer_plugin.c b/src/mixer_plugin.c
index 9f22b7e..34117a9 100644
--- a/src/mixer_plugin.c
+++ b/src/mixer_plugin.c
@@ -95,7 +95,7 @@ static int mixer_plug_info_enum(struct snd_control *ctl,
einfo->count = 1;
einfo->value.enumerated.items = val->items;
- if (einfo->value.enumerated.item > val->items)
+ if (einfo->value.enumerated.item >= val->items)
return -EINVAL;
strncpy(einfo->value.enumerated.name,