sw/source/filter/xml/xmlimp.cxx | 2 +- vcl/source/pdf/PDFiumLibrary.cxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit da1483450578ec9681ebf297c9b0ec85ebedba60 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Mar 1 19:37:12 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Mar 2 00:33:59 2026 +0100 ofz#459636292 Out-of-memory try the same sort of limits as used in: commit 8b20ac021d56ed60d09614e82e12538be290264a Date: Fri Feb 1 20:38:42 2019 +0000 ofz#12828 svm Timeout Change-Id: I847af4ea5b46db6f3ba9164e795820efd9c7ba50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200729 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index 100193da5760..daefc126f041 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -43,8 +43,10 @@ #include <vcl/font.hxx> #include <tools/stream.hxx> #include <tools/UnitConversion.hxx> +#include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> #include <rtl/ustrbuf.hxx> +#include <comphelper/configuration.hxx> #include <vcl/BitmapWriteAccess.hxx> #include <vcl/dibtools.hxx> @@ -1625,6 +1627,11 @@ Bitmap PDFiumBitmapImpl::createBitmapFromBuffer() const int nHeight = getHeight(); const int nStride = getStride(); + sal_Int64 nResult = 0; + if (comphelper::IsFuzzing() + && (o3tl::checked_multiply<sal_Int64>(nWidth, nHeight, nResult) || nResult > 4000000)) + return aBitmap; + switch (eFormat) { case vcl::pdf::PDFBitmapType::Gray: commit 7390d8a291dfa5a26b4b39b7e1d4a4e11b6a8d9c Author: Caolán McNamara <[email protected]> AuthorDate: Sun Mar 1 16:50:29 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Mar 2 00:33:49 2026 +0100 ofz#456898848 shrink allowed paragraph length Change-Id: I0cece17cedbd3a7644e2cd69f6af6fd3bd482047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200721 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 189c40c38e8a..df325bf0918e 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1916,7 +1916,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestPDFExportFODT(SvStream &rStream) { uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY); // discourage very long paragraphs for fuzzing performance - if (xPara && xPara->getString().getLength() > 15000) + if (xPara && xPara->getString().getLength() > 4000) { ret = false; break;
