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

avoid out of bounds string access

as demonstrated by ooo110088-1.doc

Change-Id: I1df32536c1eb78e3ba93885df78328fde894c186
üst 9649cb57
......@@ -344,12 +344,13 @@ sal_uInt16 SwWW8ImplReader::End_Ftn()
SwTxtNode* pTNd = rNIdx.GetNode().GetTxtNode();
if (pTNd && !pTNd->GetTxt().isEmpty() && !sChar.isEmpty())
{
if (pTNd->GetTxt()[0] == sChar[0])
const OUString &rTxt = pTNd->GetTxt();
if (rTxt[0] == sChar[0])
{
pPaM->GetPoint()->nContent.Assign( pTNd, 0 );
pPaM->SetMark();
// Strip out tabs we may have inserted on export #i24762#
if (pTNd->GetTxt()[1] == 0x09)
if (rTxt.getLength() > 1 && rTxt[1] == 0x09)
pPaM->GetMark()->nContent++;
pPaM->GetMark()->nContent++;
pReffingStck->Delete(*pPaM);
......
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