diff options
-rw-r--r-- | sw/qa/core/data/ww8/pass/hang-5.doc | bin | 0 -> 47616 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 3 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/qa/core/data/ww8/pass/hang-5.doc b/sw/qa/core/data/ww8/pass/hang-5.doc Binary files differnew file mode 100644 index 000000000000..c9d56711abd4 --- /dev/null +++ b/sw/qa/core/data/ww8/pass/hang-5.doc diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 21791a99457f..0d0fb1e54b86 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3783,8 +3783,9 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, long nTextEnd, bool& rbStar (aRes.nSprmId == eFLD) || (aRes.nSprmId == eAND) ) { + WW8_CP nMaxLegalSkip = nTextEnd - rTextPos; // Skip Field/Footnote-/End-Note here - rTextPos += nSkipChars; + rTextPos += std::min<WW8_CP>(nSkipChars, nMaxLegalSkip); nSkipPos = rTextPos-1; } } |