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:
903f4ab
)
bt-api/bt-event-handler: Fix array index issue
56/31756/1
author
Gowtham Anandha Babu
<gowtham.ab@samsung.com>
Tue, 9 Dec 2014 12:39:43 +0000
(18:09 +0530)
committer
Gowtham Anandha Babu
<gowtham.ab@samsung.com>
Tue, 9 Dec 2014 12:39:43 +0000
(18:09 +0530)
Array index 'i' is used before limits check.
Change-Id: I008cde77339b4d68aa11bcecccf15543906234e5
bt-api/bt-event-handler.c
patch
|
blob
|
history
diff --git
a/bt-api/bt-event-handler.c
b/bt-api/bt-event-handler.c
index
9cbea92
..
3d87fde
100644
(file)
--- a/
bt-api/bt-event-handler.c
+++ b/
bt-api/bt-event-handler.c
@@
-148,7
+148,7
@@
static void __bt_get_uuid_info(bluetooth_device_info_t *dev_info,
dev_info->service_index = uuid_count;
- for (i = 0;
uuids[i] != NULL && i < uuid_count
; i++) {
+ for (i = 0;
i < uuid_count && uuids[i] != NULL
; i++) {
g_strlcpy(dev_info->uuids[i], uuids[i], BLUETOOTH_UUID_STRING_MAX);
parts = g_strsplit(uuids[i], "-", -1);