projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
930654a
)
bluetooth: Fix incorrect index check with PA_ELEMENTSOF
author
Mikel Astiz
<mikel.astiz@bmw-carit.de>
Thu, 14 Feb 2013 11:50:11 +0000
(12:50 +0100)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Thu, 14 Feb 2013 12:41:10 +0000
(14:41 +0200)
The equality case should also be considered an index-out-of-range case.
src/modules/bluetooth/bluetooth-util.c
patch
|
blob
|
history
diff --git
a/src/modules/bluetooth/bluetooth-util.c
b/src/modules/bluetooth/bluetooth-util.c
index 98e795cce2982fe9bc5b783a50b574717713a1ac..8fa1631a4c15c670526331be806e30b856ec10d8 100644
(file)
--- a/
src/modules/bluetooth/bluetooth-util.c
+++ b/
src/modules/bluetooth/bluetooth-util.c
@@
-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];