hwpfilter/source/hwpreader.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit d4a39e1120e0a0e01127f9bd5f768bbe0600fbc7 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Dec 3 08:29:27 2025 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Dec 3 11:11:41 2025 +0100 ofz#465488771 Integer-overflow Change-Id: I1d10fc57e2a9a48d3aa65bd7c3592f5888ec09f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194943 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 756fe644b2bc..121183d4e7a2 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -4171,8 +4171,10 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, const Picture* hbox) if( drawobj->type == HWPDO_ADVANCED_ARC ){ ZZParall& pal = drawobj->property.parall; - 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); + double start_angle = atan2(static_cast<double>(pal.pt[0].y) - pal.pt[1].y, + static_cast<double>(pal.pt[1].x) - pal.pt[0].x ); + double end_angle = atan2(static_cast<double>(pal.pt[2].y) - pal.pt[1].y, + static_cast<double>(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 );
