oox: fix div by zero in lclCalculateCropPercentage()
commit01f4878da9bcb844c3c871df808f24fdc7a189ab
authorMiklos Vajna <vmiklos@collabora.com>
Wed, 15 Jun 2022 13:52:18 +0000 (15 15:52 +0200)
committerXisco Fauli <xiscofauli@libreoffice.org>
Thu, 16 Jun 2022 09:03:20 +0000 (16 11:03 +0200)
tree91664d786a1fc127edbaa3debc95d3ad0a7befc3
parent45f2ad8f0ec4088217233132cab093180edec79c
oox: fix div by zero in lclCalculateCropPercentage()

Similar to what oox::vml::ShapeType::getAbsRectangle() already does.

Crashreport signature:

Fatal signal received: SIGFPE code: 1 for address: 0x7fcd55eeff59

program/libooxlo.so
        oox::drawingml::GraphicProperties::pushToPropMap(oox::PropertyMap&, oox::GraphicHelper const&, bool, bool) const
oox/source/drawingml/fillproperties.cxx:103

Change-Id: I0f82cbc955d9e60bad103682638b07153a5589e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135910
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 2859ec288f2c1323ea3123d82cb1684b349ff598)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135944
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
oox/source/drawingml/fillproperties.cxx