You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pe...@apache.org on 2018/10/12 09:05:38 UTC
svn commit: r1843629 -
/openoffice/branches/AOO416/main/tools/source/string/strimp.cxx
Author: petko
Date: Fri Oct 12 09:05:38 2018
New Revision: 1843629
URL: http://svn.apache.org/viewvc?rev=1843629&view=rev
Log:
strimp.patch applied
Modified:
openoffice/branches/AOO416/main/tools/source/string/strimp.cxx
Modified: openoffice/branches/AOO416/main/tools/source/string/strimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO416/main/tools/source/string/strimp.cxx?rev=1843629&r1=1843628&r2=1843629&view=diff
==============================================================================
--- openoffice/branches/AOO416/main/tools/source/string/strimp.cxx (original)
+++ openoffice/branches/AOO416/main/tools/source/string/strimp.cxx Fri Oct 12 09:05:38 2018
@@ -1148,7 +1148,10 @@ STRING& STRING::ConvertLineEnd( LineEnd
// Bei \r oder \n gibt es neuen Zeilenumbruch
if ( (pStr[i] == _CR) || (pStr[i] == _LF) )
{
- nLen = nLen + nLineEndLen;
+ if( nLen <= STRING_MAXLEN - nLineEndLen )
+ nLen = nLen + nLineEndLen;
+ else
+ nLen = STRING_MAXLEN;
// Wenn schon gesetzt, dann brauchen wir keine aufwendige Abfrage
if ( !bConvert )
@@ -1169,7 +1172,10 @@ STRING& STRING::ConvertLineEnd( LineEnd
++i;
}
else
- ++nLen;
+ {
+ if( nLen < STRING_MAXLEN )
+ ++nLen;
+ }
++i;
// Wenn String zu lang, dann konvertieren wir nicht