Kaydet (Commit) 65169f6b authored tarafından Caolán McNamara's avatar Caolán McNamara

crashtesting: check nLineIdx

Change-Id: If499712955702e760524478711160194ecea47c0
Reviewed-on: https://gerrit.libreoffice.org/55954
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst dab606b9
......@@ -495,7 +495,7 @@ bool SbiScanner::NextSym()
}
// Strings:
else if (aLine[nLineIdx] == '"' || aLine[nLineIdx] == '[')
else if (nLineIdx < aLine.getLength() && (aLine[nLineIdx] == '"' || aLine[nLineIdx] == '['))
{
sal_Unicode cSep = aLine[nLineIdx];
if( cSep == '[' )
......@@ -545,7 +545,7 @@ bool SbiScanner::NextSym()
}
// Date:
else if (aLine[nLineIdx] == '#')
else if (nLineIdx < aLine.getLength() && aLine[nLineIdx] == '#')
{
sal_Int32 n = nCol + 1;
do
......@@ -592,7 +592,7 @@ bool SbiScanner::NextSym()
}
}
// invalid characters:
else if (aLine[nLineIdx] >= 0x7F)
else if (nLineIdx < aLine.getLength() && aLine[nLineIdx] >= 0x7F)
{
GenError( ERRCODE_BASIC_SYNTAX ); nLineIdx++; nCol++;
}
......
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