rymanluk commented on code in PR #1813:
URL: https://github.com/apache/mynewt-nimble/pull/1813#discussion_r1703850177
##########
nimble/host/audio/services/bass/src/ble_audio_svc_bass.c:
##########
@@ -298,10 +331,23 @@ ble_svc_audio_bass_add_source(uint8_t *data, uint16_t
data_len, uint16_t conn_ha
operation.op = BLE_SVC_AUDIO_BASS_OPERATION_ADD_SOURCE;
operation.conn_handle = conn_handle;
+ offset++;
operation.add_source.adv_addr.type = data[offset++];
+ if (operation.add_source.adv_addr.type < 0 ||
+ operation.add_source.adv_addr.type > 3) {
Review Comment:
do not use magic number
--
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]