[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Wed Oct 11 09:30:37 UTC 2017


 sw/source/filter/ww8/ww8scan.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be3bc11d38dbd10bf6fe3ac78003515dbd6cbd3c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 10 17:14:19 2017 +0100

    ofz#3507: keep early failure of ofz#3110 in sync to address oom
    
    Change-Id: Ic3bcfd684295293431d576931ef082a4ea09404a
    Reviewed-on: https://gerrit.libreoffice.org/43322
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index e41a89e8e682..d02cb762ed78 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2153,7 +2153,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
     bool failure = false;
     nIMax = ncpN;
 
-    if ((nIMax < 1) || (nIMax > (WW8_CP_MAX - 4)/6) || ((nPN + ncpN) > USHRT_MAX) || nPN < 0)
+    if ((nIMax < 1) || (nIMax > (WW8_CP_MAX - 4) / (4 + nStru)) || ((nPN + ncpN) > USHRT_MAX) || nPN < 0)
         failure = true;
 
     if (!failure)


More information about the Libreoffice-commits mailing list