summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 8289820c987f..9408e2cce226 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2180,7 +2180,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
//that relate to each annotation index as the parser passes
//those points.
sal_Int32 nLen = nEnd - nStart;
- if( nLen )
+ // the start and end positions are apparently stored in
+ // different arrays, so in an invalid file only one could exist
+ if(SAL_MAX_INT32 != nEnd && SAL_MAX_INT32 != nStart && nLen > 0)
{
if (pPaM->GetPoint()->nContent.GetIndex() >= nLen)
{