[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - drawinglayer/source
Caolán McNamara
caolanm at redhat.com
Thu Jun 28 16:43:19 UTC 2018
drawinglayer/source/tools/emfphelperdata.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 8e5441469e07e85c5bd278ac5777eb2b550f900a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 26 11:58:30 2018 +0100
forcepoint#47 bail when we detect the emf is broken
Change-Id: I065635393763af774b45cbba6bd85c4334383b93
Reviewed-on: https://gerrit.libreoffice.org/56458
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 2c49949870f4..509ce5339a55 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -837,12 +837,21 @@ namespace emfplushelper
next = rMS.Tell() + (size - 12);
if (size < 12)
+ {
SAL_WARN("drawinglayer", "Size field is less than 12 bytes");
+ break;
+ }
else if (size > length)
+ {
SAL_WARN("drawinglayer", "Size field is greater than bytes left");
+ break;
+ }
if (dataSize > (size - 12))
+ {
SAL_WARN("drawinglayer", "DataSize field is greater than Size-12");
+ break;
+ }
SAL_INFO("drawinglayer", "EMF+ record size: " << size << " type: " << emfTypeToName(type) << " flags: " << flags << " data size: " << dataSize);
More information about the Libreoffice-commits
mailing list