svx/source/svdraw/svdpdf.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 1698ddd3a5f026b3bda75229fe8659c2af99c77a Author: Caolán McNamara <[email protected]> AuthorDate: Wed Oct 15 10:55:15 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Oct 15 17:08:05 2025 +0200 cid#451711189 Integer-overflow Change-Id: Ib83e3f108a49eccb0c12d75485fbc6e900446b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192430 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index f269c7cbff9d..24dc7e8596ab 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -1696,6 +1696,14 @@ void ImpSdrPdfImport::ImportText(std::unique_ptr<vcl::pdf::PDFiumPageObject> con basegfx::B2DHomMatrix aTextMatrix(maCurrentMatrix); aTextRect *= aTextMatrix; + + if (!std::isfinite(aTextRect.getMinX()) || !std::isfinite(aTextRect.getMaxX()) + || !std::isfinite(aTextRect.getMinY()) || !std::isfinite(aTextRect.getMaxY())) + { + SAL_WARN("sd.filter", "unusable text rectangle: " << aTextRect); + return; + } + const tools::Rectangle aRect = PointsToLogic(aTextRect.getMinX(), aTextRect.getMaxX(), aTextRect.getMinY(), aTextRect.getMaxY());
