sw/source/filter/ww8/ww8par.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 00b28ffe72284464c99e30a4bfb163f475f248b1 Author: Caolán McNamara <[email protected]> Date: Tue Oct 24 12:31:20 2017 +0100 ofz#3765 Integer-overflow Change-Id: Ifff9cf1d094db1abe5236be41a5e769f8113aec1 Reviewed-on: https://gerrit.libreoffice.org/43763 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 0dcf361b8445..996419b84712 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4116,7 +4116,10 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) // Call all 64 CRs; not for Header and the like if ((nCrCount++ & 0x40) == 0 && nType == MAN_MAINTEXT) { - m_nProgress = (sal_uInt16)( l * 100 / nTextLen ); + if (nTextLen < WW8_CP_MAX/100) + m_nProgress = (sal_uInt16)(l * 100 / nTextLen); + else + m_nProgress = (sal_uInt16)(l / nTextLen * 100); m_xProgress->Update(m_nProgress); // Update } }
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
