Diff between 393a65277dafd5a29387a5388fc2bad381af30dc and 82d40ad07594df2d6fc1f201c592482af0e56285
Changed Files
| File | Additions | Deletions | Status |
| android/avrcp-lib.c | +4 | -1 | modified |
Full Patch
diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c
index ec5ffdb..c01ccbb 100644
--- a/android/avrcp-lib.c
+++ b/android/avrcp-lib.c
@@ -1964,7 +1964,10 @@ int avrcp_get_player_attribute_text_rsp(struct avrcp *session,
ptr[0] = attrs[i];
put_be16(AVRCP_CHARSET_UTF8, &ptr[1]);
ptr[3] = len;
- memcpy(&ptr[4], text[i], len);
+
+ if (len)
+ memcpy(&ptr[4], text[i], len);
+
ptr += 4 + len;
length += 4 + len;
}