Fixed crash when duplicating PHYSFS_Io for zipfiles. stable-3.0
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Oct 2017 12:16:51 -0400
branchstable-3.0
changeset 1621 409a4c592a4d
parent 1616 3d5a84dd1ebe
child 1622 059e6cc0039d
Fixed crash when duplicating PHYSFS_Io for zipfiles.
(transplanted from 67ca4c4f043ecf050c395e767845733512c83de2)
src/physfs_archiver_zip.c
--- a/src/physfs_archiver_zip.c	Wed Sep 27 16:13:00 2017 -0400
+++ b/src/physfs_archiver_zip.c	Mon Oct 23 12:16:51 2017 -0400
@@ -455,6 +455,7 @@
     finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry);
     GOTO_IF_ERRPASS(!finfo->io, failed);
 
+    initializeZStream(&finfo->stream);
     if (finfo->entry->compression_method != COMPMETH_NONE)
     {
         finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE);