[Libreoffice-commits] core.git: 2 commits - drawinglayer/source svtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 13 20:14:27 UTC 2018
drawinglayer/source/tools/emfphelperdata.cxx | 13 +++++++++++--
svtools/source/svhtml/parhtml.cxx | 6 +++++-
2 files changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 98cf7063dfda2e4958145c5b0f25d91200270864
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 13 17:14:50 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 13 22:14:18 2018 +0200
ofz: Integer-overflow
Change-Id: I4f5e133195b46839da96952952ad119855dfbddf
Reviewed-on: https://gerrit.libreoffice.org/58948
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 71aa5acd7620..fa31a1271d95 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -18,6 +18,7 @@
*/
#include <comphelper/string.hxx>
+#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
#include <tools/color.hxx>
@@ -2027,7 +2028,10 @@ bool HTMLParser::ParseMetaOptionsImpl(
if (comphelper::string::getTokenCount(aContent, ';') == 2)
{
Date aDate(aContent.getToken(0, ';').toInt32());
- tools::Time aTime(aContent.getToken(1, ';').toInt64());
+ auto nTime = aContent.getToken(1, ';').toInt64();
+ if (nTime < 0)
+ nTime = o3tl::saturating_toggle_sign(nTime);
+ tools::Time aTime(nTime);
DateTime aDateTime(aDate, aTime);
uDT = aDateTime.GetUNODateTime();
valid = true;
commit 364b559e2e090824d304e816827e12ba34539994
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 13 17:22:43 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 13 22:14:04 2018 +0200
ofz: Null-deference
Change-Id: I339cfb54379b1c98a04747046ed599a23d49c220
Reviewed-on: https://gerrit.libreoffice.org/58949
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index ebbcc2f3f5a7..72674e6c4a1a 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1666,8 +1666,13 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+ SetClipPath combine mode: " << combineMode);
SAL_INFO("drawinglayer", "EMF+\tpath in slot: " << (flags & 0xff));
- EMFPPath& path = *static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
- ::basegfx::B2DPolyPolygon& clipPoly(path.GetPolygon(*this));
+ EMFPPath *path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
+ if (!path)
+ {
+ break;
+ }
+
+ ::basegfx::B2DPolyPolygon& clipPoly(path->GetPolygon(*this));
// clipPoly.transform(rState.mapModeTransform);
HandleNewClipRegion( combineClip(mrPropertyHolders.Current().getClipPolyPolygon(), combineMode, clipPoly), mrTargetHolders, mrPropertyHolders);
@@ -1679,6 +1684,10 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+ SetClipRegion");
SAL_INFO("drawinglayer", "EMF+\tregion in slot: " << (flags & 0xff) << " combine mode: " << combineMode);
EMFPRegion *region = static_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get());
+ if (!region)
+ {
+ break;
+ }
HandleNewClipRegion(combineClip(mrPropertyHolders.Current().getClipPolyPolygon(), combineMode, region->regionPolyPolygon), mrTargetHolders, mrPropertyHolders);
break;
More information about the Libreoffice-commits
mailing list