From fd59e16f1893d8b49b0fae421d09df7161b52616 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Wed, 12 Aug 2020 23:06:08 -0500 Subject: Fixed boundary check for enum --- src/mixer_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.3