diff options
Diffstat (limited to 'src/components/transport_manager/src/tcp/tcp_transport_adapter.cc')
-rw-r--r-- | src/components/transport_manager/src/tcp/tcp_transport_adapter.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc index 3747225a89..6c4ee0cd89 100644 --- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc +++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc @@ -1,5 +1,4 @@ -/** - * +/* * Copyright (c) 2013, Ford Motor Company * All rights reserved. * @@ -36,6 +35,7 @@ #include <errno.h> #include <sstream> #include <cstdlib> +#include <stdio.h> #include "resumption/last_state.h" @@ -101,7 +101,7 @@ void TcpTransportAdapter::Store() const { if (port != -1) { // don't want to store incoming applications Json::Value application_dictionary; char port_record[12]; - sprintf(port_record, "%d", port); + snprintf(port_record, sizeof(port_record), "%d", port); application_dictionary["port"] = std::string(port_record); applications_dictionary.append(application_dictionary); } |