summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-05-07 15:32:38 +0900
committerSho Amano <samano@xevo.com>2018-07-06 12:50:14 +0900
commit8c589453d331c49607d021d6e40d76b97aa5ff1c (patch)
tree8ed7499abdff18fc9021a587885ba58cf60128c3
parent92d03d64236864a191c5e8ab9fa3c1c35111a486 (diff)
downloadsdl_core-8c589453d331c49607d021d6e40d76b97aa5ff1c.tar.gz
fix: invalid memory access in BluetoothDevice log message
This is detected by valgrind.
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device.cc4
1 files changed, 3 insertions, 1 deletions
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 <sys/socket.h>
#include <algorithm>
+#include <iostream>
#include <limits>
#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<void*>(channel_out));
if (app_handle < 0 || app_handle > std::numeric_limits<uint8_t>::max()) {
LOG4CXX_TRACE(logger_,
"exit with FALSE. Condition: app_handle < 0 || app_handle > "