You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ts...@apache.org on 2014/01/30 09:51:21 UTC
svn commit: r1562728 -
/incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp
Author: tschoening
Date: Thu Jan 30 08:51:20 2014
New Revision: 1562728
URL: http://svn.apache.org/r1562728
Log:
LOG4CXX-422:Depending on overlapping milliseconds findMillisecondStart returned a wrong index for the start of the milliseconds which later lead to corrupted buffers for the cache.
Modified:
incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp
Modified: incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp
URL: http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp?rev=1562728&r1=1562727&r2=1562728&view=diff
==============================================================================
--- incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp (original)
+++ incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp Thu Jan 30 08:51:20 2014
@@ -147,7 +147,7 @@ int CachedDateFormat::findMillisecondSta
&& (formatted.length() == i + (formatted.length() - i)
|| plusZero.compare(i + (plusZero.length() - i),
LogString::npos, plusMagic, i + (plusMagic.length() - i), LogString::npos) == 0)) {
- return i;
+ return i - (3 - (formatted.length() - i));
} else {
return UNRECOGNIZED_MILLISECONDS;
}