[Libreoffice-commits] core.git: sfx2/source sw/qa
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jan 10 20:42:42 UTC 2021
sfx2/source/doc/oleprops.cxx | 65 +++++++++++++++++++++++--------------------
1 file changed, 36 insertions(+), 29 deletions(-)
New commits:
commit bed03603f6cae264abb9e5b58aa2ab00448d92ff
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jan 9 20:12:17 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jan 10 21:42:00 2021 +0100
ofz#29414 uncaught exception
Change-Id: Ic9328cf2a4712cc49c304b1d1e5e34e301ab5312
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109041
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index b8777b66d57b..a9e2b9b8a874 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -1155,36 +1155,43 @@ SfxOleSection& SfxOlePropertySet::AddSection( const SvGlobalName& rSectionGuid )
void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
{
- // read property set header
- sal_uInt16 nByteOrder;
- sal_uInt16 nVersion;
- sal_uInt16 nOsMinor;
- sal_uInt16 nOsType;
- SvGlobalName aGuid;
- sal_Int32 nSectCount(0);
- rStrm.ReadUInt16( nByteOrder ).ReadUInt16( nVersion ).ReadUInt16( nOsMinor ).ReadUInt16( nOsType );
- rStrm >> aGuid;
- rStrm.ReadInt32( nSectCount );
-
- // read sections
- sal_uInt64 nSectPosPos = rStrm.Tell();
- for (sal_Int32 nSectIdx = 0; nSectIdx < nSectCount; ++nSectIdx)
+ try
{
- // read section guid/position pair
- rStrm.Seek(nSectPosPos);
- SvGlobalName aSectGuid;
- rStrm >> aSectGuid;
- sal_uInt32 nSectPos(0);
- rStrm.ReadUInt32(nSectPos);
- if (!rStrm.good())
- break;
- nSectPosPos = rStrm.Tell();
- // read section
- if (!checkSeek(rStrm, nSectPos))
- break;
- LoadObject(rStrm, AddSection(aSectGuid));
- if (!rStrm.good())
- break;
+ // read property set header
+ sal_uInt16 nByteOrder;
+ sal_uInt16 nVersion;
+ sal_uInt16 nOsMinor;
+ sal_uInt16 nOsType;
+ SvGlobalName aGuid;
+ sal_Int32 nSectCount(0);
+ rStrm.ReadUInt16( nByteOrder ).ReadUInt16( nVersion ).ReadUInt16( nOsMinor ).ReadUInt16( nOsType );
+ rStrm >> aGuid;
+ rStrm.ReadInt32( nSectCount );
+
+ // read sections
+ sal_uInt64 nSectPosPos = rStrm.Tell();
+ for (sal_Int32 nSectIdx = 0; nSectIdx < nSectCount; ++nSectIdx)
+ {
+ // read section guid/position pair
+ rStrm.Seek(nSectPosPos);
+ SvGlobalName aSectGuid;
+ rStrm >> aSectGuid;
+ sal_uInt32 nSectPos(0);
+ rStrm.ReadUInt32(nSectPos);
+ if (!rStrm.good())
+ break;
+ nSectPosPos = rStrm.Tell();
+ // read section
+ if (!checkSeek(rStrm, nSectPos))
+ break;
+ LoadObject(rStrm, AddSection(aSectGuid));
+ if (!rStrm.good())
+ break;
+ }
+ }
+ catch (const SvStreamEOFException&)
+ {
+ rStrm.SetError(SVSTREAM_READ_ERROR);
}
}
diff --git a/sw/qa/core/data/ww6/fail/crash-2.doc b/sw/qa/core/data/ww6/pass/crash-2.doc
similarity index 100%
rename from sw/qa/core/data/ww6/fail/crash-2.doc
rename to sw/qa/core/data/ww6/pass/crash-2.doc
diff --git a/sw/qa/core/data/ww6/fail/crash-4.doc b/sw/qa/core/data/ww6/pass/crash-4.doc
similarity index 100%
rename from sw/qa/core/data/ww6/fail/crash-4.doc
rename to sw/qa/core/data/ww6/pass/crash-4.doc
diff --git a/sw/qa/core/data/ww6/fail/crash-5.doc b/sw/qa/core/data/ww6/pass/crash-5.doc
similarity index 100%
rename from sw/qa/core/data/ww6/fail/crash-5.doc
rename to sw/qa/core/data/ww6/pass/crash-5.doc
diff --git a/sw/qa/core/data/ww6/fail/crash-6.doc b/sw/qa/core/data/ww6/pass/crash-6.doc
similarity index 100%
rename from sw/qa/core/data/ww6/fail/crash-6.doc
rename to sw/qa/core/data/ww6/pass/crash-6.doc
diff --git a/sw/qa/core/data/ww6/fail/hang-1.doc b/sw/qa/core/data/ww6/pass/hang-1.doc
similarity index 100%
rename from sw/qa/core/data/ww6/fail/hang-1.doc
rename to sw/qa/core/data/ww6/pass/hang-1.doc
diff --git a/sw/qa/core/data/ww8/fail/hang-4.doc b/sw/qa/core/data/ww8/pass/hang-4.doc
similarity index 100%
rename from sw/qa/core/data/ww8/fail/hang-4.doc
rename to sw/qa/core/data/ww8/pass/hang-4.doc
More information about the Libreoffice-commits
mailing list