hwpfilter/source/hwpreader.cxx      |    4 +---
 hwpfilter/source/hwpreader.hxx      |    2 +-
 vcl/source/filter/svm/SvmReader.cxx |   12 ++++++++++++
 3 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit b8e3c05261b0658fcb27c3cc12c7c0646e5aa983
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Mar 10 09:10:29 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 10 12:14:41 2022 +0100

    can be const
    
    Change-Id: Iccb2f715025aad564850f3d21d46794337400237
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131306
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 0db70d2aa685..89609e65fd5f 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3856,7 +3856,7 @@ void HwpReader::makePicture(Picture * hbox)
     }
 }
 
-void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
+void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, const Picture* hbox)
 {
     int x = hbox->pgx;
     int y = hbox->pgy;
@@ -4413,7 +4413,6 @@ void HwpReader::makePictureDRAW(HWPDrawingObject 
*drawobj, Picture * hbox)
     }
 }
 
-
 void HwpReader::makeLine()
 {
     mxList->addAttribute("text:style-name", sXML_CDATA, "Horizontal Line");
@@ -4421,7 +4420,6 @@ void HwpReader::makeLine()
     mxList->clear();
 }
 
-
 /**
  * Input-comment-hidden description: shows a hidden explanation to the users.
  * Parse out only strings, but it may contain paragraphs.
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index 699ea331c1a7..0cb9e62c0c19 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -130,7 +130,7 @@ private:
     void makeFormula(TxtBox *hbox);
     void makeHyperText(TxtBox *hbox);
     void makePicture(Picture *hbox);
-    void makePictureDRAW(HWPDrawingObject *drawobj, Picture *hbox);
+    void makePictureDRAW(HWPDrawingObject *drawobj, const Picture *hbox);
     void makeLine();
     void makeHidden(Hidden *hbox);
     void makeFootnote(Footnote *hbox);
commit 317779e86a8cc4d1e2e3c7e227b732407bbadf26
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Mar 10 09:07:08 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 10 12:14:26 2022 +0100

    ofz#45375 Timeout on negative width/height for MetaBmpExScaleAction
    
    Change-Id: I9c8ce8715cb683ac72f862606b6810fe4f1fe2d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131305
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index cdc731528ffb..550e9e59bcfd 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -899,8 +899,20 @@ rtl::Reference<MetaAction> SvmReader::BmpExScaleHandler()
     TypeSerializer aSerializer(mrStream);
     Point aPoint;
     aSerializer.readPoint(aPoint);
+
     Size aSize;
     aSerializer.readSize(aSize);
+    if (aSize.Width() < 0)
+    {
+        SAL_WARN("vcl.gdi", "MetaBmpExScaleAction: negative width");
+        aSize.setWidth(0);
+    }
+
+    if (aSize.Height() < 0)
+    {
+        SAL_WARN("vcl.gdi", "MetaBmpExScaleAction: negative height");
+        aSize.setHeight(0);
+    }
 
     pAction->SetBitmapEx(aBmpEx);
     pAction->SetPoint(aPoint);

Reply via email to