From 3edb855e7c0e2ac0d49fa38654efd92c3618ed8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 10 Mar 2022 09:12:29 +0000 Subject: [PATCH] ofz#45385 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7d5e4ffa7fc2c46d7a2ad679598aa1a62a623862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131307 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- hwpfilter/source/hwpreader.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 89609e65fd5f..60af8216f97b 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -3858,8 +3858,6 @@ void HwpReader::makePicture(Picture * hbox) void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, const Picture* hbox) { - int x = hbox->pgx; - int y = hbox->pgy; bool bIsRotate = false; while (drawobj) @@ -3897,6 +3895,9 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, const Picture* hbox) } else { + double x = hbox->pgx; + double y = hbox->pgy; + bIsRotate = false; if( (drawobj->property.flag & HWPDO_FLAG_ROTATION) && (drawobj->property.parall.pt[0].y != drawobj->property.parall.pt[1].y) &&