OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f030f5
)
DO NOT MERGE Prevent stack overflow in btif_storage
author
Hansong Zhang
<hsz@google.com>
Thu, 26 Apr 2018 22:45:28 +0000
(15:45 -0700)
committer
JP Sugarbroad
<jpsugar@google.com>
Wed, 30 May 2018 17:20:29 +0000
(10:20 -0700)
Bug:
73963551
Test: manual
Change-Id: I5f7a583aad150ebf9e3d492181d80ca935c8aa3f
(cherry picked from commit
1d200be95816e6e82f3876ec03091a1b07a827a7
)
btif/src/btif_storage.c
patch
|
blob
|
history
diff --git
a/btif/src/btif_storage.c
b/btif/src/btif_storage.c
index
83dcc8c
..
83c01e2
100644
(file)
--- a/
btif/src/btif_storage.c
+++ b/
btif/src/btif_storage.c
@@
-229,6
+229,10
@@
static int prop2cfg(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop)
bt_uuid_t *p_uuid = (bt_uuid_t*)prop->val + i;
memset(buf, 0, sizeof(buf));
uuid_to_string_legacy(p_uuid, buf);
+ if (strlen(value) + strlen(buf) + 1 > (int) sizeof(value) - 1) {
+ android_errorWriteLog(0x534e4554, "73963551");
+ return FALSE;
+ }
strcat(value, buf);
//strcat(value, ";");
strcat(value, " ");