Skip to content

Commit 0907701

Browse files
sjanccfriedt
authored andcommitted
tests: Bluetooth: Tester: Fix storing invalid broadcast ID
Broadcast ID is 24bits and uinitialized broadcast_id resulted in (pseudo) random failures since only 3 bytes were set by call to bt_rand(). Signed-off-by: Szymon Janc <[email protected]>
1 parent 8a5365c commit 0907701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/bluetooth/tester/src/audio/btp_bap_broadcast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ uint8_t btp_bap_broadcast_source_setup(const void *cmd, uint16_t cmd_len, void *
391391
struct bt_audio_codec_cfg codec_cfg;
392392
const struct btp_bap_broadcast_source_setup_cmd *cp = cmd;
393393
struct btp_bap_broadcast_source_setup_rp *rp = rsp;
394-
uint32_t broadcast_id;
394+
uint32_t broadcast_id = 0;
395395

396396
err = bt_rand(&broadcast_id, BT_AUDIO_BROADCAST_ID_SIZE);
397397
if (err != 0) {

0 commit comments

Comments
 (0)