From 5fc01d1326a34223746546326a7f616df8bfa991 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 29 Mar 2004 18:46:00 +0000 Subject: [PATCH] applied patch 923858 (fixes crash in zlib streams) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/zstream.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index 6c1a0c423d..5372d21481 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -57,12 +57,7 @@ wxZlibInputStream::wxZlibInputStream(wxInputStream& stream, int flags) m_inflate = new z_stream_s; if (m_inflate) { - m_inflate->zalloc = (alloc_func)0; - m_inflate->zfree = (free_func)0; - m_inflate->opaque = (voidpf)0; - m_inflate->avail_in = 0; - m_inflate->next_in = NULL; - m_inflate->next_out = NULL; + memset(m_inflate, 0, sizeof(z_stream_s)); wxASSERT((flags & ~(wxZLIB_ZLIB | wxZLIB_GZIP)) == 0); @@ -171,10 +166,7 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream, m_deflate = new z_stream_s; if (m_deflate) { - m_deflate->zalloc = (alloc_func)0; - m_deflate->zfree = (free_func)0; - m_deflate->opaque = (voidpf)0; - m_deflate->avail_in = 0; + memset(m_deflate, 0, sizeof(z_stream_s)); m_deflate->next_out = m_z_buffer; m_deflate->avail_out = m_z_size; -- 2.50.0