Skip to content

Commit

Permalink
Bug 935596 : nsJARInputStream crashes debug builds when it encounters…
Browse files Browse the repository at this point in the history
… a corrupt zip file. r=taras
  • Loading branch information
Mossop committed Nov 7, 2013
1 parent 124a03a commit 4a3228a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/libjar/nsJARInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,8 @@ nsJARInputStream::ContinueInflate(char* aBuffer, uint32_t aCount,
inflateEnd(&mZs);

// stop returning valid data as soon as we know we have a bad CRC
if (mOutCrc != mInCrc) {
// asserting because while this rarely happens, you definitely
// want to catch it in debug builds!
NS_NOTREACHED(0);
if (mOutCrc != mInCrc)
return NS_ERROR_FILE_CORRUPTED;
}
}

return NS_OK;
Expand Down

0 comments on commit 4a3228a

Please sign in to comment.