summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-24 15:36:35 +0000
committerMichael Stahl <mstahl@redhat.com>2017-11-24 23:07:29 +0100
commite977aad341f167347967046f5a884ba593ff2153 (patch)
treedd4c257ef82314cc782ad1b8541db6deeaa8bf4e
parent479719b1f53cb5f44bbcc57e75dad1aae604cd20 (diff)
ofz#4414 set new nWwCols after verifying legal size
otherwise we're returning early with the now wrong nWwCols Change-Id: I2031c23ca24241fb4946b5a5a62eabc27c2bdcc2 Reviewed-on: https://gerrit.libreoffice.org/45241 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index b65b763b73b1..225f124bbfb7 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1244,13 +1244,13 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS, short nLen)
if (nCols > MAX_COL)
return;
- short nOldCols = nWwCols;
- nWwCols = nCols;
-
nLen -= 2 * (nCols + 1); //reduce len by claimed amount of next x-borders arguments
if (nLen < 0)
return;
+ short nOldCols = nWwCols;
+ nWwCols = nCols;
+
const sal_uInt8* pT = &pS[1];
for (int i = 0; i <= nCols; i++, pT+=2)
nCenter[i] = (sal_Int16)SVBT16ToShort( pT ); // X-borders