hwpfilter/source/hwpreader.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit abf9bc2ea96c24141a6ac3fd5842ccaf050bac43
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Nov 16 15:00:08 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Nov 16 18:46:31 2025 +0100

    ofz#461057465 Integer-overflow
    
    Change-Id: I6b3468997a127de1c1fcc927f0c2c21718984f10
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194071
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index c624a20003ef..756fe644b2bc 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4159,9 +4159,9 @@ void HwpReader::makePictureDRAW(HWPDrawingObject 
*drawobj, const Picture* hbox)
                     }
 
                     mxList->addAttribute(u"svg:width"_ustr, sXML_CDATA,
-                                 OUString::number (WTMM( drawobj->extent.w * 
2)) + "mm");
+                                 OUString::number (WTMM( drawobj->extent.w * 
2.0)) + "mm");
                     mxList->addAttribute(u"svg:height"_ustr, sXML_CDATA,
-                                 OUString::number (WTMM( drawobj->extent.h * 
2)) + "mm");
+                                 OUString::number (WTMM( drawobj->extent.h * 
2.0)) + "mm");
                     if( drawobj->property.flag & HWPDO_FLAG_DRAW_PIE ||
                                      drawobj->property.fill_color < 0xffffff )
                                 mxList->addAttribute(u"draw:kind"_ustr, 
sXML_CDATA, u"section"_ustr);
@@ -4169,11 +4169,10 @@ void HwpReader::makePictureDRAW(HWPDrawingObject 
*drawobj, const Picture* hbox)
                                 mxList->addAttribute(u"draw:kind"_ustr, 
sXML_CDATA, u"arc"_ustr);
 
                     if( drawobj->type == HWPDO_ADVANCED_ARC ){
-                                double start_angle, end_angle;
                                 ZZParall& pal = drawobj->property.parall;
 
-                                start_angle = atan2(pal.pt[0].y - 
pal.pt[1].y,pal.pt[1].x - pal.pt[0].x );
-                                end_angle = atan2(pal.pt[2].y - pal.pt[1].y, 
pal.pt[1].x - pal.pt[2].x);
+                                double start_angle = atan2(pal.pt[0].y - 
pal.pt[1].y,pal.pt[1].x - pal.pt[0].x );
+                                double end_angle = atan2(pal.pt[2].y - 
pal.pt[1].y, pal.pt[1].x - pal.pt[2].x);
 
                                 if( ( start_angle > end_angle ) && 
(start_angle - end_angle < M_PI ))
                                     std::swap( start_angle, end_angle );

Reply via email to