filter/source/msfilter/svdfppt.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 7796d3e5522f0cdb6508362cbd9b49255ec866cc
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Oct 10 21:37:09 2025 +0100
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Sun Oct 12 21:07:24 2025 +0200

    ofz Use-of-uninitialized-value
    
    Change-Id: I6a80b3e16f904d50e72c03bab25164e03f192a21
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192186
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 6e7040833c9f..e368510c54de 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 );

Reply via email to