Skip to content

Commit

Permalink
Proper fix: Limit to file size
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbreuer committed Jul 15, 2013
1 parent 8cb05d6 commit 6c3aa00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/filesystem/iso9660.cpp
Expand Up @@ -902,7 +902,7 @@ long iso9660::ReadFile(HANDLE hFile, uint8_t *pBuffer, long lSize)
if ( pContext->m_bUseMode2 )
sectorSize = MODE2_DATA_SIZE;

while (lSize > 0 && pContext->m_dwFilePos + sectorSize <= pContext->m_dwFileSize)
while (lSize > 0 && pContext->m_dwFilePos < pContext->m_dwFileSize)
{
pContext->m_dwCurrentBlock = (DWORD) (pContext->m_dwFilePos / sectorSize);
int64_t iOffsetInBuffer = pContext->m_dwFilePos - (sectorSize * pContext->m_dwCurrentBlock);
Expand Down

0 comments on commit 6c3aa00

Please sign in to comment.