mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
bluetooth: Fix incorrect index check with PA_ELEMENTSOF
The equality case should also be considered an index-out-of-range case.
This commit is contained in:
parent
930654a3af
commit
b84c293ff3
1 changed files with 1 additions and 1 deletions
|
|
@ -1806,7 +1806,7 @@ const char*pa_bluetooth_get_form_factor(uint32_t class) {
|
|||
if (((class >> 8) & 31) != 4)
|
||||
return NULL;
|
||||
|
||||
if ((i = (class >> 2) & 63) > PA_ELEMENTSOF(table))
|
||||
if ((i = (class >> 2) & 63) >= PA_ELEMENTSOF(table))
|
||||
r = NULL;
|
||||
else
|
||||
r = table[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue