Kaydet (Commit) 8c0bb201 authored tarafından Caolán McNamara's avatar Caolán McNamara

avoid out of bounds string access

Change-Id: I0a0affea08528fc9bd729ab01cdb5fa6e9f8e18f
üst 894a3598
...@@ -333,14 +333,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr ) ...@@ -333,14 +333,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
while ( c < nLen ) while ( c < nLen )
{ {
rListStr += OUString(aStr[c]); rListStr += OUString(aStr[c]);
c++; ++c;
if ( aStr[c] == cDelimiter ) if ((c < nLen) && (aStr[c] == cDelimiter))
{ {
rListStr += OUString(aStr[c]); rListStr += OUString(aStr[c]);
while ( (c < nLen) && (aStr[c] == cDelimiter) ) while ((c < nLen) && (aStr[c] == cDelimiter))
c++; ++c;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment