This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 56e4d38c33 VCL: when loading PNG's, ensure we do not reuse an object
that was created on the stack
56e4d38c33 is described below
commit 56e4d38c33928bade1ec98e3d1fd9ebea94cde1d
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sun Sep 13 09:04:00 2026 +0200
VCL: when loading PNG's, ensure we do not reuse an object that was created
on the stack
Also, add a guard to ZCodec against unwanted reusal of variables.
---
main/tools/source/zcodec/zcodec.cxx | 1 +
main/vcl/source/gdi/pngread.cxx | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/main/tools/source/zcodec/zcodec.cxx
b/main/tools/source/zcodec/zcodec.cxx
index a0477cc68d..de6d1e6417 100644
--- a/main/tools/source/zcodec/zcodec.cxx
+++ b/main/tools/source/zcodec/zcodec.cxx
@@ -127,6 +127,7 @@ long ZCodec::EndCompression()
}
delete[] mpOutBuf;
delete[] mpInBuf;
+ mbInit = 0;
}
return ( mbStatus ) ? retvalue : -1;
}
diff --git a/main/vcl/source/gdi/pngread.cxx b/main/vcl/source/gdi/pngread.cxx
index 78c3bc876e..d3fe1e2bb1 100644
--- a/main/vcl/source/gdi/pngread.cxx
+++ b/main/vcl/source/gdi/pngread.cxx
@@ -967,7 +967,7 @@ void PNGReaderImpl::ImplReadIDAT()
{
// get bytes needed to fill the current scanline
sal_Int32 nToRead = mnScansize - (mpScanCurrent - mpInflateInBuf);
- sal_Int32 nRead = mpZCodec->ReadAsynchron( aIStrm, mpScanCurrent,
nToRead );
+ sal_Int32 nRead = mpZCodec->Read( aIStrm, mpScanCurrent, nToRead );
if ( nRead < 0 )
{
mbStatus = sal_False;