mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Check file actually opened before proceeding
If you loaded an invalid file, particularly with compression, the file open may fail, leading to a division by zero (on block size), or trying to read from nothing.
This commit is contained in:
parent
fa1b6493da
commit
fac171fa95
|
@ -221,7 +221,8 @@ bool InputIsoFile::Open(std::string srcfile, bool testOnly)
|
|||
m_reader = new FlatFileReader(EmuConfig.CdvdShareWrite);
|
||||
}
|
||||
|
||||
m_reader->Open(m_filename);
|
||||
if (!m_reader->Open(m_filename))
|
||||
return false;
|
||||
|
||||
// It might actually be a blockdump file.
|
||||
// Check that before continuing with the FlatFileReader.
|
||||
|
|
Loading…
Reference in New Issue