summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-06 14:45:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-06 14:45:02 +0000
commit8050da9683e859c59ed0b74b1e040a59b888aeac (patch)
tree7990bde75bfbd153c7e515e7f74142066f9009a3 /sw
parent3aa58661aab928548c73a61cf450c010cd2b44dc (diff)
don't access past end of string
Change-Id: Ia431f51cb02bbd235cdfe56a8131d7b622e9e311
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/porexp.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 40eeb2aad5f1..8c7a2b1062e8 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -150,7 +150,7 @@ MSHORT SwBlankPortion::MayUnderFlow( const SwTxtFormatInfo &rInf,
return 0; // Nur noch BlankPortions unterwegs
// Wenn vor uns ein Blank ist, brauchen wir kein Underflow ausloesen,
// wenn hinter uns ein Blank ist, brauchen wir kein Underflow weiterreichen
- if( bUnderFlow && CH_BLANK == rInf.GetTxt()[ nIdx + 1] )
+ if (bUnderFlow && nIdx + 1 < rInf.GetTxt().getLength() && CH_BLANK == rInf.GetTxt()[nIdx + 1])
return 0;
if( nIdx && !((SwTxtFormatInfo&)rInf).GetFly() )
{