From 46759cab03c28adbe4325d865b5fe68240cceb0d Mon Sep 17 00:00:00 2001 From: Kari Argillander Date: Wed, 13 Dec 2023 04:36:37 +0200 Subject: [PATCH] Fix RemoteSyslogChannel setProperty value check (#4339) We compare just 4 first letters. So if value would have example be syslevel then this function would work wrong. Nothing major but nice to fix. Co-authored-by: Kari Argillander --- Net/src/RemoteSyslogChannel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Net/src/RemoteSyslogChannel.cpp b/Net/src/RemoteSyslogChannel.cpp index e1a5b1d26..2d526ae75 100644 --- a/Net/src/RemoteSyslogChannel.cpp +++ b/Net/src/RemoteSyslogChannel.cpp @@ -176,7 +176,7 @@ void RemoteSyslogChannel::setProperty(const std::string& name, const std::string std::string facility; if (Poco::icompare(value, 4, "LOG_") == 0) facility = Poco::toUpper(value.substr(4)); - else if (Poco::icompare(value, 4, "SYSLOG_") == 0) + else if (Poco::icompare(value, 7, "SYSLOG_") == 0) facility = Poco::toUpper(value.substr(7)); else facility = Poco::toUpper(value);