[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jun 26 20:45:36 UTC 2017
sw/source/filter/ww8/ww8scan.cxx | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit bbd0d521677d9dfaaea100b3943e9912f582359c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 26 13:21:49 2017 +0100
ofz#2392 restored props don't match saved props
Change-Id: Idb198f0121ac9c6b4083b157af07c5eb1cda66cb
Reviewed-on: https://gerrit.libreoffice.org/39266
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f71618f56044..6ce951b8a529 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5339,8 +5339,19 @@ void WW8PLCFxDesc::Restore( const WW8PLCFxSave1& rSave )
pPLCFx->GetSprms(&aD);
pPLCFx->SetDirty(false);
aD.ReduceByOffset();
- pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
- nSprmsLen = nOrigSprmsLen - rSave.nPLCFxMemOfs;
+
+ if (nOrigSprmsLen > aD.nSprmsLen)
+ {
+ //two entries exist for the same offset, cut and run
+ SAL_WARN("sw.ww8", "restored properties don't match saved properties, bailing out");
+ nSprmsLen = 0;
+ pMemPos = nullptr;
+ }
+ else
+ {
+ nSprmsLen = nOrigSprmsLen - rSave.nPLCFxMemOfs;
+ pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list