3.7: Bluetooth: TBS: TBS client may return NULL instead of the empty string in callbacks #84148
Labels
area: Bluetooth Audio
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
If the TBS client receives an empty value when reading a string, it treated that as NULL, but since empty strings are still strings, it should simply treat it as such, and provide
"\0"
instead. The callbacks are documented to return strings.To Reproduce
Steps to reproduce the behavior:
NULL
provided to the callbackExpected behavior
Expect the TBS client to follow its documentation and always return a string when there's no read error.
Impact
Confused developers. The TMAP sample would call
strlen
andstrncpy
on a NULL value.Logs and console output
Environment (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: