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:
3a2eca8
)
Don't allow the invalid ADV handle
12/269312/1
accepted/tizen/unified/20220117.135002
submit/tizen/20220112.235928
author
dh79pyun
<dh79.pyun@samsung.com>
Wed, 12 Jan 2022 23:40:52 +0000
(08:40 +0900)
committer
dh79pyun
<dh79.pyun@samsung.com>
Wed, 12 Jan 2022 23:40:52 +0000
(08:40 +0900)
Change-Id: Ieca085a04733bcfdc69d028d9fde8205d21f1c67
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
bt-api/bt-adapter-le.c
patch
|
blob
|
history
diff --git
a/bt-api/bt-adapter-le.c
b/bt-api/bt-adapter-le.c
index
e4f80cd
..
efd8ef6
100644
(file)
--- a/
bt-api/bt-adapter-le.c
+++ b/
bt-api/bt-adapter-le.c
@@
-321,6
+321,11
@@
BT_EXPORT_API int bluetooth_set_advertising_data(int handle, const bluetooth_adv
BT_CHECK_PARAMETER(value, return);
BT_CHECK_ENABLED_ANY(return);
+ if (handle == 0) {
+ BT_ERR("Invalid handle value: %d", handle);
+ return BLUETOOTH_ERROR_INVALID_PARAM;
+ }
+
if (length > BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX - 3)
return BLUETOOTH_ERROR_INVALID_PARAM;