projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a53ef93
)
Check le_adv_slot before access
61/193761/1
author
Deokhyun Kim
<dukan.kim@samsung.com>
Mon, 26 Nov 2018 06:43:20 +0000
(15:43 +0900)
committer
Deokhyun Kim
<dukan.kim@samsung.com>
Mon, 26 Nov 2018 06:43:20 +0000
(15:43 +0900)
- bt-service crashes by invalid memory access when _bt_is_advertising is called
before adv info is initialized.
Change-Id: I75b4efb9c4ccb209860453e467f9847669cc7624
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
bt-service/bt-service-adapter-le.c
patch
|
blob
|
history
diff --git
a/bt-service/bt-service-adapter-le.c
b/bt-service/bt-service-adapter-le.c
index
4a50b1e
..
d85f6bb
100644
(file)
--- a/
bt-service/bt-service-adapter-le.c
+++ b/
bt-service/bt-service-adapter-le.c
@@
-330,6
+330,9
@@
gboolean _bt_is_advertising(void)
gboolean status = FALSE;
int i;
+ if (le_adv_slot == NULL)
+ return FALSE;
+
for (i = 0; i < le_feature_info.adv_inst_max; i++) {
if (le_adv_slot[i].is_advertising == TRUE)
status = TRUE;