The attached patch fixes an infinite loop in log4cxx if a module
hierarchy name of "." was used in certain circumstances/API calls which
ended up in calling Hierarchy::updateParents
Hope this helps someone!
Cheers,
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
--- hierarchy.cpp.orig 2008-11-14 15:43:50.000000000 +0000
+++ hierarchy.cpp 2008-11-14 15:44:42.000000000 +0000
@@ -335,7 +335,7 @@
// if name = "w.x.y.z", loop thourgh "w.x.y", "w.x" and "w", but not "w.x.y.z"
for(size_t i = name.find_last_of(0x2E /* '.' */, length-1);
- i != LogString::npos;
+ i>1 && i != LogString::npos;
i = name.find_last_of(0x2E /* '.' */, i-1))
{
LogString substr = name.substr(0, i);