Merge branch 'bugfix/fix_bluedroid_ai_review_bugs_20260427' into 'master'

Bugfix/fix bluedroid ai review bugs 20260427

See merge request espressif/esp-idf!48450
This commit is contained in:
Island
2026-06-01 19:20:35 +08:00
127 changed files with 3991 additions and 1405 deletions
+4 -1
View File
@@ -353,7 +353,10 @@ bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg
memcpy(lmsg, msg, sizeof(btc_msg_t));
if (arg) {
memset(lmsg->arg, 0x00, arg_len); //important, avoid arg which have no length
/* memcpy below covers exactly arg_len bytes, which is the full size of
* the destination buffer (it was sized as sizeof(btc_msg_t) + arg_len),
* so a prior memset would be redundant. Deep-copy callbacks must only
* read fields that were written by the caller-supplied arg. */
memcpy(lmsg->arg, arg, arg_len);
if (copy_func) {
copy_func(lmsg, lmsg->arg, arg);