rymanluk commented on code in PR #1833:
URL: https://github.com/apache/mynewt-nimble/pull/1833#discussion_r1721288971
##########
nimble/host/audio/services/bass/src/ble_audio_svc_bass.c:
##########
@@ -618,12 +618,16 @@ static int
ble_svc_audio_bass_ctrl_point_write_access(struct ble_gatt_access_ctxt *ctxt,
uint16_t conn_handle)
{
struct ble_svc_audio_bass_ctrl_point_handler *handler;
+ uint16_t mbuf_len = OS_MBUF_PKTLEN(ctxt->om);
+ uint8_t opcode;
+ uint8_t data[MYNEWT_VAL(BLE_SVC_AUDIO_BASS_METADATA_MAX_SZ)];
- uint8_t opcode = ctxt->om->om_data[0];
+ os_mbuf_copydata(ctxt->om, 0, mbuf_len, data);
Review Comment:
are we sure we want to put those data on the stack?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]