Kaydet (Commit) ad44bb45 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Michael Weghorn

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: 's avatarMichael Weghorn <m.weghorn@posteo.de>
üst f6bca058
...@@ -2140,13 +2140,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, ...@@ -2140,13 +2140,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream) SvStream *pDataStream)
{ {
sal_uInt8 nField; sal_uInt8 nField;
// nHeaderBype == version
sal_uInt32 nHeaderByte = 0;
// The following is a FFData structure as described in // The following is a FFData structure as described in
// Microsoft's DOC specification (chapter 2.9.78) // Microsoft's DOC specification (chapter 2.9.78)
sal_uInt32 nVersion = 0;
pDataStream->ReadUInt32( nHeaderByte ); 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 // might be better to read the bits as a 16 bit word
// ( like it is in the spec. ) // ( like it is in the spec. )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment