Unverified Commit 2d8c4b1c authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Merge pull request #1140 from mattiasj-axis/fix-syslog-termination

Fix syslog output
parents fd534722 d969f862
...@@ -59,7 +59,8 @@ protected: ...@@ -59,7 +59,8 @@ protected:
payload = msg.payload; payload = msg.payload;
} }
::syslog(syslog_prio_from_level(msg), "%s", payload.data()); int length = std::min<std::common_type<int, std::size_t>::type>(std::numeric_limits<int>::max(), payload.size());
::syslog(syslog_prio_from_level(msg), "%.*s", length, payload.data());
} }
void flush_() override {} void flush_() override {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment