diff options
author | Matadeen Mishra <matade@codeaurora.org> | 2015-09-04 16:52:26 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:22:15 -0600 |
commit | c6d466c548ac3ba18d3cac5c3903c3ad93317685 (patch) | |
tree | 2d141d024fae1e5072ed231942c1ad3c1edef215 /stack/smp/smp_br_main.c | |
parent | 2e14d2f4e2c287842865b50e19242ca69daa4a6c (diff) | |
download | android_system_bt-c6d466c548ac3ba18d3cac5c3903c3ad93317685.tar.gz android_system_bt-c6d466c548ac3ba18d3cac5c3903c3ad93317685.tar.bz2 android_system_bt-c6d466c548ac3ba18d3cac5c3903c3ad93317685.zip |
Bluedroid BT: Fixed Static Analysis Issues
- This fix avoids NULL pointer dereferences
and Array Index Out of Bounds Exceptions
in the bluedroid stack code space of Bluetooth.
Change-Id: I5a6fcfe6943918b324f5b36f72b1e0e338db5a3d
CRs-Fixed: 890309
Diffstat (limited to 'stack/smp/smp_br_main.c')
-rw-r--r-- | stack/smp/smp_br_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/smp/smp_br_main.c b/stack/smp/smp_br_main.c index 11039ec20..ff12d0366 100644 --- a/stack/smp/smp_br_main.c +++ b/stack/smp/smp_br_main.c @@ -384,7 +384,7 @@ void smp_br_state_machine_event(tSMP_CB *p_cb, tSMP_BR_EVENT event, void *p_data /* execute action functions */ for (UINT8 i = 0; i < SMP_BR_NUM_ACTIONS; i++) { - if ((action = state_table[entry - 1][i]) != SMP_BR_SM_NO_ACTION) + if ((action = state_table[entry - 1][i]) < SMP_BR_SM_NO_ACTION) { (*smp_br_sm_action[action])(p_cb, (tSMP_INT_DATA *)p_data); } |