diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-10 17:14:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-11 11:30:08 +0200 |
commit | be3bc11d38dbd10bf6fe3ac78003515dbd6cbd3c (patch) | |
tree | cb961ed3863110c0010468472c213656cb39066e /sw | |
parent | 8809915132522a2a05aab0020a6c424c271fcf6b (diff) |
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@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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) |