Skip to content
Snippets Groups Projects
Verified Commit 9a90e194 authored by Kai Kretschmann's avatar Kai Kretschmann :cat2:
Browse files

Even more checks

parent 5413fb6c
No related branches found
No related tags found
No related merge requests found
Pipeline #1623 failed
......@@ -46,7 +46,8 @@ void Receiver::loop() {
std::string daemonIP = _vm["daemon"].as<std::string>();
auto *unconstDaemonIP = new char[daemonIP.size()+1];
strncpy(unconstDaemonIP, daemonIP.c_str(), daemonIP.size());
unconstDaemonIP[sizeof unconstDaemonIP - 1] = 0;
strncpy(unconstDaemonIP, daemonIP.c_str(), sizeof(unconstDaemonIP));
if (dlt_client_set_server_ip(&dltclient, unconstDaemonIP) == -1) {
BOOST_LOG_TRIVIAL(error) << "set serial ip didn't succeed";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment