[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 27 13:41:39 UTC 2019
sw/source/filter/ww8/ww8par3.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit ad44bb453177e16d07e37f40745154b571489ffe
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 24 11:59:56 2019 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Sat Apr 27 15:40:34 2019 +0200
crashtesting: imported junk as form field text
spec says "An unsigned integer that MUST be 0xFFFFFFFF" for version
so at least insist on that
Change-Id: I8c11659d86fe122b1c8f61b1bf99e7b4b53ff306
Reviewed-on: https://gerrit.libreoffice.org/71236
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 012755119be2..2eae61737df4 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2140,13 +2140,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream)
{
sal_uInt8 nField;
- // nHeaderBype == version
- sal_uInt32 nHeaderByte = 0;
// The following is a FFData structure as described in
// Microsoft's DOC specification (chapter 2.9.78)
-
- pDataStream->ReadUInt32( nHeaderByte );
+ sal_uInt32 nVersion = 0;
+ pDataStream->ReadUInt32(nVersion);
+ // An unsigned integer that MUST be 0xFFFFFFFF
+ if (nVersion != 0xFFFFFFFF)
+ {
+ SAL_WARN("sw.ww8", "Parsing error: invalid header for FFData");
+ return; // bail out
+ }
// might be better to read the bits as a 16 bit word
// ( like it is in the spec. )
More information about the Libreoffice-commits
mailing list