[Libreoffice-commits] core.git: drawinglayer/source

Caolán McNamara caolanm at redhat.com
Tue Jun 26 13:03:31 UTC 2018


 drawinglayer/source/tools/emfphelperdata.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 3f750c1e7f8b4dac1dac0333a3f8270e1d7fea00
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/56456
    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 78b76ecfe647..c529c255beb1 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -830,12 +830,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