Compare commits

..
3 Commits
Author SHA1 Message Date
Connor McLaughlin fac171fa95 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.
2021-12-18 13:41:56 +00:00
refractionpcsx2 fa1b6493da CDVD GZip: Correct type causing index creation to fail 2021-12-17 11:46:31 +00:00
refractionpcsx2 e58766745c Log: Restore BIOS Found message 2021-12-16 11:45:12 +00:00
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ static void WriteIndexToFile(Access* index, const char* filename)
return;
}
auto fp = FileSystem::OpenManagedCFile(filename, "rb");
auto fp = FileSystem::OpenManagedCFile(filename, "wb");
if (!fp)
return;
+2 -1
View File
@@ -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.
+2
View File
@@ -119,6 +119,8 @@ static bool LoadBiosVersion(std::FILE* fp, u32& version, std::string& descriptio
version = strtol(vermaj, (char**)NULL, 0) << 8;
version |= strtol(vermin, (char**)NULL, 0);
foundRomVer = true;
Console.WriteLn("Bios Found: %s", description.c_str());
}
if ((rd.fileSize % 0x10) == 0)