diff options
author | Matadeen Mishra <matade@codeaurora.org> | 2015-08-21 09:47:05 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:22:00 -0600 |
commit | fada44256f77be2e7cdf1b6089c15c4b08a76046 (patch) | |
tree | 3a19278722436dd7dfc10c723f1feacb1632754b /stack/smp/smp_main.c | |
parent | c50610c030fc7b0bd547750a9851b772d836391a (diff) | |
download | android_system_bt-fada44256f77be2e7cdf1b6089c15c4b08a76046.tar.gz android_system_bt-fada44256f77be2e7cdf1b6089c15c4b08a76046.tar.bz2 android_system_bt-fada44256f77be2e7cdf1b6089c15c4b08a76046.zip |
BT: Fixed Static Analysis Issues
- This fix avoids NULL pointer dereferences,
Array Index Out of Bounds Exceptions
and Banned funciton in the bluedroid code
space of Bluetooth.
CRs-Fixed: 890309, 890321
Change-Id: I24ae794ee01b65b5ab15c73cd82677b0481910ad
Diffstat (limited to 'stack/smp/smp_main.c')
-rw-r--r-- | stack/smp/smp_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/smp/smp_main.c b/stack/smp/smp_main.c index 2d80343a6..98d3e50fd 100644 --- a/stack/smp/smp_main.c +++ b/stack/smp/smp_main.c @@ -851,7 +851,7 @@ const char * smp_get_event_name(tSMP_EVENT event) { const char *p_str = smp_event_name[SMP_MAX_EVT]; - if (event <= SMP_MAX_EVT) + if (event && event <= SMP_MAX_EVT) { p_str = smp_event_name[event- 1]; } |