Hello BlueZ devs,
I have run into a segfault trying to connect to a Jolla
phone today.
I am using BlueZ 5.46 as packaged for Arch Linux. I have
recompiled the package with debug symbols and ran in gdb
and Valgrind. The gdb backtrace and Valgrind output are
attached.
The question is, given the number of errors reported by
Valgrind, am I looking for a single bug, or is BlueZ
rather cavalier when it comes to memory safety?
(No offense, just asking.)
From what I was able to find out, the problem is that
bluetoothd attempts to print an adapter's address in ba2str,
but the argument it gets is rubbish. More precisely, in
ba2str(btd_adapter_get_address(device->adapter), srcaddr);
device->adapter contains random data.
I'd like to find the issue, any help is appreciated.
-- David