summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Bauer <sbauer@plzdonthack.me>2017-10-11 22:26:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-11 22:26:14 +0000
commit48e5396b99e31047e96c8fdb839ff97fa2978555 (patch)
tree38534fd11038b1965a1517476ff14ba6881dddc8
parent27e67ba2773f8b11182596b9d540ed6efd829d02 (diff)
parent4d1470eb54592f7c9317419a2f1f83dc75cce770 (diff)
downloadandroid_system_bt-48e5396b99e31047e96c8fdb839ff97fa2978555.tar.gz
android_system_bt-48e5396b99e31047e96c8fdb839ff97fa2978555.tar.bz2
android_system_bt-48e5396b99e31047e96c8fdb839ff97fa2978555.zip
Read the correct amount of attributes
am: 4d1470eb54 Change-Id: I153a91a1aba1a78837c397d4ee01bea2d1696e4e
-rw-r--r--bta/gatt/bta_gattc_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bta/gatt/bta_gattc_cache.c b/bta/gatt/bta_gattc_cache.c
index e2c904de7..d283b382d 100644
--- a/bta/gatt/bta_gattc_cache.c
+++ b/bta/gatt/bta_gattc_cache.c
@@ -1550,7 +1550,7 @@ bool bta_gattc_cache_load(tBTA_GATTC_CLCB *p_clcb)
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;
}