tools/source/zcodec/zcodec.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 18537bead90d87bc50230c746c42638125f02812 Author: David Tardon <dtar...@redhat.com> Date: Fri Oct 7 16:29:36 2016 +0200 don't call inflateEnd if inflateInit failed This fixes the following valgrind message: ==12572== Conditional jump or move depends on uninitialised value(s) ==12572== at 0x1505C89C: inflateEnd (inflate.c:1258) ==12572== by 0xD17644D: ZCodec::EndCompression() (zcodec.cxx:106) ==12572== by 0xD17724E: ZCodec::AttemptDecompression(SvStream&, SvStream&) (zcodec.cxx:405) ==12572== by 0x5F17020A: PlainTextFilterDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:157) ==12572== by 0x3C3F098C: filter::config::TypeDetection::impl_askDetectService(rtl::OUString const&, utl::MediaDescriptor&) (typedetection.cxx:1040) ==12572== by 0x3C3F0449: filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor&, std::__debug::list<filter::config::FlatDetectionInfo, std::allocator<filter::config::FlatDetectionInfo> > const&, bool, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString&) (typedetection.cxx:946) ==12572== by 0x3C3ED6A1: filter::config::TypeDetection::queryTypeByDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, unsigned char) (typedetection.cxx:427) ==12572== by 0x49B232CF: OwnView_Impl::GetFilterNameFromExtentionAndInStream(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&) (ownview.cxx:219) ==12572== by 0x49B011EB: OleEmbeddedObject::TryToConvertToOOo() (oleembed.cxx:268) ==12572== by 0x49B03AD1: OleEmbeddedObject::doVerb(int) (oleembed.cxx:837) ==12572== by 0x9F5C353: SfxInPlaceClient::DoVerb(long) (ipclient.cxx:946) ==12572== by 0x402D395A: SwWrtShell::LaunchOLEObj(long) (wrtsh1.cxx:588) ==12572== Change-Id: I51c0fbdc185897c60f6c0099b96c6ca9c25a35ba diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index a20c0d6..161aa33 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -336,7 +336,6 @@ void ZCodec::InitCompress() void ZCodec::InitDecompress(SvStream & inStream) { assert(meState == STATE_INIT); - meState = STATE_DECOMPRESS; if ( mbStatus && mbGzLib ) { sal_uInt8 n1, n2, j, nMethod, nFlags; @@ -388,6 +387,8 @@ void ZCodec::InitDecompress(SvStream & inStream) { mbStatus = ( inflateInit( PZSTREAM ) >= 0 ); } + if ( mbStatus ) + meState = STATE_DECOMPRESS; mpInBuf = new sal_uInt8[ mnInBufSize ]; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits