OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0008b6
)
SDP: Bounds check 'id' parameter for free_sdp_slot()
author
Andre Eisenbach
<eisenbach@google.com>
Tue, 8 Aug 2017 22:41:21 +0000
(15:41 -0700)
committer
Myles Watson
<mylesgw@google.com>
Wed, 9 Aug 2017 21:29:25 +0000
(21:29 +0000)
Merged-In: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
Test: manual
Fixes:
37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
(cherry picked from commit
b413f1b1365af4273647727e497848f95312d0ec
)
btif/src/btif_sdp_server.c
patch
|
blob
|
history
diff --git
a/btif/src/btif_sdp_server.c
b/btif/src/btif_sdp_server.c
index
d02dfa0
..
90d74cf
100644
(file)
--- a/
btif/src/btif_sdp_server.c
+++ b/
btif/src/btif_sdp_server.c
@@
-215,7
+215,8
@@
static int alloc_sdp_slot(bluetooth_sdp_record* in_record) {
static int free_sdp_slot(int id) {
int handle = -1;
bluetooth_sdp_record* record = NULL;
- if(id >= MAX_SDP_SLOTS) {
+ if(id < 0 || id >= MAX_SDP_SLOTS) {
+ android_errorWriteLog(0x534e4554, "37502513");
APPL_TRACE_ERROR("%s() failed - id %d is invalid", __func__, id);
return handle;
}