Skip to content
Commit e8d09001 authored by Ivan Iushkov's avatar Ivan Iushkov Committed by Fabio Baltieri
Browse files

Bluetooth: fixing UBSAN warnings related to Codec Configuration



During local testing with UBSAN enabled, warning was reported:
bluetooth/host/iso.c:237:2: runtime error: null pointer passed
as argument 2, which is declared to never be null

It turned out that when datapath doesn't contain
codec information, cc_len is 0 and cc is NULL

In order to avoid UB,
now we call memcpy only when cp->codec_config_len > 0

Signed-off-by: default avatarIvan Iushkov <ivan.iushkov@nordicsemi.no>
parent b1e9f863
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment