diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-24 15:36:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-24 17:13:06 +0100 |
commit | eea59fff8545eea112507cbf2d8423729f038868 (patch) | |
tree | d3b9c18056d1428684081c80f9c0f698d678aa4e /sw | |
parent | 392e5dfee9947d07d093c8045c9a6e7b078e2721 (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/45240
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/ww8par2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index c2eb4fed9f20..a517dffe03ea 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1241,13 +1241,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 |