You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2021/11/06 00:43:19 UTC
[logging-log4cxx] 14/20: Fix infinite recursion and crash
This is an automated email from the ASF dual-hosted git repository.
rmiddleton pushed a commit to branch LOGCXX-510
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit df8d963720b04fc3801b7731a3ee5a4aafe0fc15
Author: Robert Middleton <ro...@rm5248.com>
AuthorDate: Fri Nov 5 18:51:50 2021 -0400
Fix infinite recursion and crash
---
src/main/cpp/fileinputstream.cpp | 3 ++-
src/main/cpp/rootlogger.cpp | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/cpp/fileinputstream.cpp b/src/main/cpp/fileinputstream.cpp
index d9a8917..af5aec8 100644
--- a/src/main/cpp/fileinputstream.cpp
+++ b/src/main/cpp/fileinputstream.cpp
@@ -65,7 +65,8 @@ void FileInputStream::open(const LogString& filename)
}
-FileInputStream::FileInputStream(const File& aFile)
+FileInputStream::FileInputStream(const File& aFile) :
+ m_priv(std::make_unique<FileInputStreamPrivate>())
{
apr_fileperms_t perm = APR_OS_DEFAULT;
apr_int32_t flags = APR_READ;
diff --git a/src/main/cpp/rootlogger.cpp b/src/main/cpp/rootlogger.cpp
index c51c4ac..5c3529f 100644
--- a/src/main/cpp/rootlogger.cpp
+++ b/src/main/cpp/rootlogger.cpp
@@ -43,7 +43,7 @@ void RootLogger::setLevel(const LevelPtr level1)
}
else
{
- setLevel(level1);
+ Logger::setLevel(level1);
}
}