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
98e795c
..
8fa1631
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];