vcl/source/filter/ipdf/pdfread.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 7504cf29784cb1f04de1364e2f0aa68698809495 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Oct 12 12:48:19 2025 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Oct 13 09:35:30 2025 +0200 ofz#451188537 Null-dereference READ Change-Id: Ida4e0deb43eb04ec0286645bb84d3c6bbb8e1e5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192246 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index b705f2b76263..f8c83f4b942c 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -417,6 +417,11 @@ size_t ImportPDFUnloaded(SvStream& rStream, std::vector<PDFGraphicResult>& rGrap Graphic aGraphic(pGfxLink, nPageIndex); auto pPage = pPdfDocument->openPage(nPageIndex); + if (!pPage) + { + SAL_WARN("vcl.filter", "ImportPDF: unable to open page: " << nPageIndex); + continue; + } std::vector<PDFGraphicAnnotation> aPDFGraphicAnnotations = findAnnotations(pPage, aPageSize);
