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:
490fcbd
)
DO NOT MERGE Fix unexpected behavior in smp_sm_event
author
Hansong Zhang
<hsz@google.com>
Fri, 30 Mar 2018 23:27:37 +0000
(16:27 -0700)
committer
android-build-team Robot
<android-build-team-robot@google.com>
Fri, 3 Aug 2018 19:12:27 +0000
(19:12 +0000)
Bug:
74121126
Test: manual
Change-Id: Ie5dd841d6461ad057c4ab572007f38c5446aba53
(cherry picked from commit
652798b2f2d6c90e0fc95c00ccfb91e2870b03d4
)
stack/smp/smp_main.cc
patch
|
blob
|
history
diff --git
a/stack/smp/smp_main.cc
b/stack/smp/smp_main.cc
index
829a5d4
..
49e2ece
100644
(file)
--- a/
stack/smp/smp_main.cc
+++ b/
stack/smp/smp_main.cc
@@
-18,6
+18,7
@@
#include "bt_target.h"
+#include <cutils/log.h>
#include <string.h>
#include "smp_int.h"
@@
-954,6
+955,13
@@
void smp_sm_event(tSMP_CB* p_cb, tSMP_EVENT event, void* p_data) {
uint8_t curr_state = p_cb->state;
tSMP_SM_TBL state_table;
uint8_t action, entry, i;
+
+ if (p_cb->role >= 2) {
+ SMP_TRACE_DEBUG("Invalid role: %d", p_cb->role);
+ android_errorWriteLog(0x534e4554, "74121126");
+ return;
+ }
+
tSMP_ENTRY_TBL entry_table = smp_entry_table[p_cb->role];
SMP_TRACE_EVENT("main smp_sm_event");