Made ISO9660 use a buffer for reading blocks to make sure memory protection failure handlers are called properly.

This commit is contained in:
Jean-Philip Desjardins 2015-07-04 22:34:32 -04:00
parent ea52599452
commit c844eb3aff
2 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,12 @@ CISO9660::~CISO9660()
void CISO9660::ReadBlock(uint32 address, void* data)
{
m_blockProvider->ReadBlock(address, data);
//The buffer is needed to make sure exception handlers
//are properly called as some system calls (ie.: ReadFile)
//won't generate an exception when trying to write to
//a write protected area
m_blockProvider->ReadBlock(address, m_blockBuffer);
memcpy(data, m_blockBuffer, CBlockProvider::BLOCKSIZE);
}
bool CISO9660::GetFileRecord(CDirectoryRecord* record, const char* filename)

View File

@ -25,4 +25,6 @@ private:
BlockProviderPtr m_blockProvider;
ISO9660::CVolumeDescriptor m_volumeDescriptor;
ISO9660::CPathTable m_pathTable;
uint8 m_blockBuffer[ISO9660::CBlockProvider::BLOCKSIZE];
};