diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-10-11 23:11:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-10-11 23:11:13 +0000 |
commit | 83aee7b3ba29e47fceffe0966d6f3f6240078c8e (patch) | |
tree | 32b47d755684b0251d5c359d7bc58f64d44319bc | |
parent | 181144a50114c824cfe3cdfd695c11a074673a5e (diff) | |
parent | 68a1cf1a9de115b66bececf892588075595b263f (diff) | |
download | bt-83aee7b3ba29e47fceffe0966d6f3f6240078c8e.tar.gz |
Merge "Read the correct amount of attributes" into oc-dev
-rw-r--r-- | bta/gatt/bta_gattc_cache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bta/gatt/bta_gattc_cache.cc b/bta/gatt/bta_gattc_cache.cc index 97e384da2..07bae93b0 100644 --- a/bta/gatt/bta_gattc_cache.cc +++ b/bta/gatt/bta_gattc_cache.cc @@ -1460,7 +1460,7 @@ bool bta_gattc_cache_load(tBTA_GATTC_CLCB* p_clcb) { attr = (tBTA_GATTC_NV_ATTR*)osi_malloc(sizeof(tBTA_GATTC_NV_ATTR) * num_attr); - if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), 0xFF, fd) != num_attr) { + if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), num_attr, fd) != num_attr) { APPL_TRACE_ERROR("%s: can't read GATT attributes: %s", __func__, fname); goto done; } |