Bug 536911: fix null dereference topcash r=alfredkayser

This commit is contained in:
Taras Glek
2009-12-31 10:10:20 -08:00
parent 9bab6f1849
commit c7a2bc8794
3 changed files with 71 additions and 0 deletions

View File

@@ -89,6 +89,8 @@ nsJARInputStream::InitFile(nsJAR *aJar, nsZipItem *item)
// Must keep handle to filepointer and mmap structure as long as we need access to the mmapped data
mFd = aJar->mZip.GetFD();
mZs.next_in = aJar->mZip.GetData(item);
if (!mZs.next_in)
return NS_ERROR_FILE_CORRUPTED;
mZs.avail_in = item->Size();
mOutSize = item->RealSize();
mZs.total_out = 0;