Skip to content
This repository
Browse code

Proper fix: Limit to file size

  • Loading branch information...
commit 6c3aa00afb860a2dbeb1cc8d0edc8932c64a5bd2 1 parent 8cb05d6
jmbreuer authored July 13, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  xbmc/filesystem/iso9660.cpp
2  xbmc/filesystem/iso9660.cpp
@@ -902,7 +902,7 @@ long iso9660::ReadFile(HANDLE hFile, uint8_t *pBuffer, long lSize)
902 902
   if ( pContext->m_bUseMode2 )
903 903
     sectorSize = MODE2_DATA_SIZE;
904 904
 
905  
-  while (lSize > 0 && pContext->m_dwFilePos + sectorSize <= pContext->m_dwFileSize)
  905
+  while (lSize > 0 && pContext->m_dwFilePos < pContext->m_dwFileSize)
906 906
   {
907 907
     pContext->m_dwCurrentBlock = (DWORD) (pContext->m_dwFilePos / sectorSize);
908 908
     int64_t iOffsetInBuffer = pContext->m_dwFilePos - (sectorSize * pContext->m_dwCurrentBlock);

0 notes on commit 6c3aa00

Please sign in to comment.
Something went wrong with that request. Please try again.