ensure OUString::copy is within bounds
Change-Id: I7b8c2e764da01e38fb9f7048bcaeca93a72fafa3
This commit is contained in:
@@ -441,7 +441,7 @@ void SmParser::NextToken()
|
|||||||
}
|
}
|
||||||
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
|
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
|
||||||
{
|
{
|
||||||
if (m_aBufferString.copy(nRealStart, 2) == "%%")
|
if (nRealStart + 2 <= nBufLen && m_aBufferString.copy(nRealStart, 2) == "%%")
|
||||||
{
|
{
|
||||||
//SkipComment
|
//SkipComment
|
||||||
m_nBufferIndex = nRealStart + 2;
|
m_nBufferIndex = nRealStart + 2;
|
||||||
|
Reference in New Issue
Block a user