filter/source/msfilter/svdfppt.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 7395e7383d2d106b58915f78455590cd52e64818 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Oct 10 21:37:09 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Oct 20 09:44:44 2025 +0200 ofz Use-of-uninitialized-value Change-Id: I6a80b3e16f904d50e72c03bab25164e03f192a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192187 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 20d3e5d9bc96..443b276a3f9a 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1778,7 +1778,13 @@ static bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal { sal_uInt64 nOldPos = rInput.Tell(); std::unique_ptr<char[]> pBuf(new char[ nInputSize ]); - rInput.ReadBytes(pBuf.get(), nInputSize); + auto nRead = rInput.ReadBytes(pBuf.get(), nInputSize); + if (nRead < nInputSize) + { + SAL_WARN("filter.ms", "Parsing error: " << nInputSize << + " bytes wanted, but " << nRead << " available"); + nInputSize = nRead; + } ZCodec aZCodec( 0x8000, 0x8000 ); aZCodec.BeginCompression(); SvMemoryStream aSource( pBuf.get(), nInputSize, StreamMode::READ );
