Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crengine/src/lvstream/lvzipdecodestream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,12 @@ LVStream *LVZipDecodeStream::Create(LVStreamRef stream, lvpos_t pos, lString32 n
if ( stream->Seek( pos, LVSEEK_SET, NULL )!=LVERR_OK )
return NULL;
#endif
if ( packSize==0 && unpSize==0 ) {
// Can happen when local header does not carry these sizes
// Use the ones provided that come from zip central directory
packSize = srcPackSize;
unpSize = srcUnpSize;
}

// When local header does not carry these sizes, use the ones
// that come from zip central directory
if ( packSize==0 ) packSize = srcPackSize;
if ( unpSize==0 ) unpSize = srcUnpSize;

if ((lvpos_t)(pos + packSize) > (lvpos_t)stream->GetSize())
return NULL;
if (hdr.getMethod() == 0) {
Expand Down