From 8c589453d331c49607d021d6e40d76b97aa5ff1c Mon Sep 17 00:00:00 2001 From: Sho Amano Date: Mon, 7 May 2018 15:32:38 +0900 Subject: fix: invalid memory access in BluetoothDevice log message This is detected by valgrind. --- src/components/transport_manager/src/bluetooth/bluetooth_device.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc index 038515170d..e7cc3d4f34 100644 --- a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc +++ b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc @@ -45,6 +45,7 @@ #include #include +#include #include #include "utils/logger.h" @@ -56,7 +57,8 @@ bool BluetoothDevice::GetRfcommChannel(const ApplicationHandle app_handle, uint8_t* channel_out) { LOG4CXX_TRACE(logger_, "enter. app_handle: " << app_handle - << ", channel_out: " << channel_out); + << ", channel_out: " << std::hex + << reinterpret_cast(channel_out)); if (app_handle < 0 || app_handle > std::numeric_limits::max()) { LOG4CXX_TRACE(logger_, "exit with FALSE. Condition: app_handle < 0 || app_handle > " -- cgit v1.2.1