You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2025/10/30 05:17:51 UTC
(logging-log4cxx) branch replace_unsafe_cast created (now 1e0c51bb)
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a change to branch replace_unsafe_cast
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
at 1e0c51bb Prevent potential fault configuring a user-defined Level
This branch includes the following new commits:
new 1e0c51bb Prevent potential fault configuring a user-defined Level
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-log4cxx) 01/01: Prevent potential fault configuring a user-defined Level
Posted by sw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch replace_unsafe_cast
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 1e0c51bb4f07431bbd302796ffbe2dc3643f945e
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Thu Oct 30 16:17:29 2025 +1100
Prevent potential fault configuring a user-defined Level
---
src/main/cpp/domconfigurator.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/cpp/domconfigurator.cpp b/src/main/cpp/domconfigurator.cpp
index 6983c9be..d54a092a 100644
--- a/src/main/cpp/domconfigurator.cpp
+++ b/src/main/cpp/domconfigurator.cpp
@@ -824,10 +824,7 @@ void DOMConfigurator::parseLevel(
try
{
- Level::LevelClass& levelClass =
- (Level::LevelClass&)Loader::loadClass(className);
- LevelPtr level = levelClass.toLevel(levelStr);
- logger->setLevel(level);
+ logger->setLevel(dynamic_cast<const Level::LevelClass&>(Loader::loadClass(className)).toLevel(levelStr));
}
catch (Exception& oops)
{