Fixed crash when duplicating PHYSFS_Io for zipfiles.

(transplanted from 67ca4c4f043ecf050c395e767845733512c83de2)
This commit is contained in:
Ryan C. Gordon 2017-10-23 12:16:51 -04:00
parent 12b7a80640
commit e290b8d0a0
1 changed files with 1 additions and 0 deletions

View File

@ -455,6 +455,7 @@ static PHYSFS_Io *ZIP_duplicate(PHYSFS_Io *io)
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);