diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-09 21:01:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-09 21:02:11 +0200 |
commit | 34e951bd7284d2e771c279e3adc3899d191fdad0 (patch) | |
tree | 8a2aac81ae8b577397bdc4f6f54e21939dbdde16 /starmath | |
parent | f58ee783eebf74108c1c1dd5f24e6abaa19c4f09 (diff) |
More OUString::copy out-of-bounds fixes
Change-Id: I45762d167d04252e32155a7b23a3290688bccdf6
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 2302087900bb..5a79bbb7cd11 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -441,7 +441,7 @@ void SmParser::NextToken() } else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR) { - if (nRealStart + 2 <= nBufLen && m_aBufferString.copy(nRealStart, 2) == "%%") + if (nRealStart + 2 <= nBufLen && m_aBufferString.match("%%", nRealStart)) { //SkipComment m_nBufferIndex = nRealStart + 2; @@ -543,7 +543,7 @@ void SmParser::NextToken() { case '<': { - if (m_aBufferString.copy(nRealStart, 2) == "<<") + if (m_aBufferString.match("<<", nRealStart)) { m_aCurToken.eType = TLL; m_aCurToken.cMathChar = MS_LL; @@ -553,7 +553,7 @@ void SmParser::NextToken() rnEndPos = nRealStart + 2; } - else if (m_aBufferString.copy(nRealStart, 2) == "<=") + else if (m_aBufferString.match("<=", nRealStart)) { m_aCurToken.eType = TLE; m_aCurToken.cMathChar = MS_LE; @@ -563,7 +563,7 @@ void SmParser::NextToken() rnEndPos = nRealStart + 2; } - else if (m_aBufferString.copy(nRealStart, 2) == "<>") + else if (m_aBufferString.match("<>", nRealStart)) { m_aCurToken.eType = TNEQ; m_aCurToken.cMathChar = MS_NEQ; @@ -573,7 +573,7 @@ void SmParser::NextToken() rnEndPos = nRealStart + 2; } - else if (m_aBufferString.copy(nRealStart, 3) == "<?>") + else if (m_aBufferString.match("<?>", nRealStart)) { m_aCurToken.eType = TPLACE; m_aCurToken.cMathChar = MS_PLACE; @@ -595,7 +595,7 @@ void SmParser::NextToken() break; case '>': { - if (m_aBufferString.copy(nRealStart, 2) == ">=") + if (m_aBufferString.match(">=", nRealStart)) { m_aCurToken.eType = TGE; m_aCurToken.cMathChar = MS_GE; @@ -605,7 +605,7 @@ void SmParser::NextToken() rnEndPos = nRealStart + 2; } - else if (m_aBufferString.copy(nRealStart, 2) == ">>") + else if (m_aBufferString.match(">>", nRealStart)) { m_aCurToken.eType = TGG; m_aCurToken.cMathChar = MS_GG; @@ -770,7 +770,7 @@ void SmParser::NextToken() break; case '#': { - if (m_aBufferString.copy(nRealStart, 2) == "##") + if (m_aBufferString.match("##", nRealStart)) { m_aCurToken.eType = TDPOUND; m_aCurToken.cMathChar = '\0'; @@ -828,7 +828,7 @@ void SmParser::NextToken() break; case '+': { - if (m_aBufferString.copy(nRealStart, 2) == "+-") + if (m_aBufferString.match("+-", nRealStart)) { m_aCurToken.eType = TPLUSMINUS; m_aCurToken.cMathChar = MS_PLUSMINUS; @@ -850,7 +850,7 @@ void SmParser::NextToken() break; case '-': { - if (m_aBufferString.copy(nRealStart, 2) == "-+") + if (m_aBufferString.match("-+", nRealStart)) { m_aCurToken.eType = TMINUSPLUS; m_aCurToken.cMathChar = MS_MINUSPLUS; |