szymon-czapracki commented on code in PR #1843:
URL: https://github.com/apache/mynewt-nimble/pull/1843#discussion_r1727483756
##########
nimble/host/audio/services/bass/src/ble_audio_svc_bass.c:
##########
@@ -298,10 +320,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:
There is a test that ensures we detect those scenarios.

--
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]