summaryrefslogtreecommitdiffstats
path: root/tools/hciconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hciconfig.c')
-rw-r--r--tools/hciconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 703bdbd8..d641d09c 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -676,7 +676,7 @@ static void cmd_class(int ctl, int hdev, char *opt)
} else
printf("Unspecified");
printf("\n\tDevice Class: ");
- if ((cls[1] & 0x1f) > sizeof(*major_devices))
+ if ((cls[1] & 0x1f) >= sizeof(major_devices) / sizeof(*major_devices))
printf("Invalid Device Class!\n");
else
printf("%s, %s\n", major_devices[cls[1] & 0x1f],