summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-21 14:19:56 +0200
committerGitHub <noreply@github.com>2021-07-21 14:19:56 +0200
commit3e76f06af7af9df0dbf0d7888942091809991c99 (patch)
treea68d9970ea14148b1d34cd4f2213ae50a7686090
parent4905081708c409f63ecce1e9801ab5a917bc5960 (diff)
parenta4faa1ca40ae16e4e1970e65da4bf96ddf9fb923 (diff)
downloadusbutils-3e76f06af7af9df0dbf0d7888942091809991c99.tar.gz
Merge pull request #131 from lzaoral/desc-defs-oob
desc-defs.c: fix possible out-of-bound read
-rw-r--r--desc-defs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/desc-defs.c b/desc-defs.c
index 30afb69..4cad9e7 100644
--- a/desc-defs.c
+++ b/desc-defs.c
@@ -966,7 +966,7 @@ static void desc_snowflake_dump_uac1_as_interface_wformattag(
/* Format codes are 0xTNNN, where T=Type prefix, NNN = format code. */
- if (value <= ((UAC_FORMAT_TYPE_I << 12) +
+ if (value < ((UAC_FORMAT_TYPE_I << 12) +
ARRAY_LEN(audio_data_format_type_i))) {
format_string = audio_data_format_type_i[value];