system/bt
修订版 | b882eee2da11673ff71193948d6b789d441d430d (tree) |
---|---|
时间 | 2017-10-07 05:11:29 |
作者 | Dan Pasanen <dan.pasanen@gmai...> |
Commiter | Dan Pasanen |
Fix allocating buffers of the right size when BT_HDR is included
Missed in 8825957cc44b705c782c8b2d33c87a66e02376f6
Change-Id: I5d631f609578ef8e4e2626d7f4a1cc77a6d90ecf
@@ -410,7 +410,7 @@ void mca_ccb_hdl_req(tMCA_CCB *p_ccb, tMCA_CCB_EVT *p_data) | ||
410 | 410 | |
411 | 411 | if (((reject_code != MCA_RSP_SUCCESS) && (evt_data.hdr.op_code != MCA_OP_SYNC_INFO_IND)) |
412 | 412 | || send_rsp) { |
413 | - BT_HDR *p_buf = (BT_HDR *)osi_malloc(MCA_CTRL_MTU); | |
413 | + BT_HDR *p_buf = (BT_HDR *)osi_malloc(MCA_CTRL_MTU + sizeof(BT_HDR)); | |
414 | 414 | p_buf->offset = L2CAP_MIN_OFFSET; |
415 | 415 | p = p_start = (UINT8*)(p_buf + 1) + L2CAP_MIN_OFFSET; |
416 | 416 | *p++ = reject_opcode; |