aboutsummaryrefslogtreecommitdiff
path: root/btif/src/btif_storage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'btif/src/btif_storage.cc')
-rw-r--r--btif/src/btif_storage.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/btif/src/btif_storage.cc b/btif/src/btif_storage.cc
index 9d4a84ed0..1c34787b2 100644
--- a/btif/src/btif_storage.cc
+++ b/btif/src/btif_storage.cc
@@ -235,6 +235,10 @@ static int prop2cfg(const RawAddress* 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, sizeof(buf));
+ if (strlen(value) + strlen(buf) + 1 > (int) sizeof(value) - 1) {
+ android_errorWriteLog(0x534e4554, "73963551");
+ return false;
+ }
strcat(value, buf);
// strcat(value, ";");
strcat(value, " ");