It is possible to have property with empty value (ie. bonded devices) so check len before calling memcpy. --- android/bluetooth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index 4e4397a..70b0849 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -1160,7 +1160,9 @@ static int fill_hal_prop(void *buf, uint8_t type, uint16_t len, prop->type = type; prop->len = len; - memcpy(prop->val, val, len); + + if (len) + memcpy(prop->val, val, len); return sizeof(*prop) + len; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html