Fixed out of bound read in zip file loader

This commit is contained in:
alexey.lysiuk 2017-10-23 11:56:39 +03:00
parent cb982ec313
commit 50d39771c0

View file

@ -312,7 +312,7 @@ bool FZipFile::Open(bool quiet)
} }
// skip Directories // skip Directories
if (name[len - 1] == '/' && LittleLong(zip_fh->UncompressedSize) == 0) if (name.IsEmpty() || (name.Back() == '/' && LittleLong(zip_fh->UncompressedSize) == 0))
{ {
skipped++; skipped++;
continue; continue;