mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Do not try to read past directory sector in detection of media type. Fixes #697
This commit is contained in:
@@ -1831,8 +1831,8 @@ namespace Aaru.Core.Media.Detection
|
||||
{
|
||||
int rootPos = ri * 2048;
|
||||
|
||||
while(isoSector[rootPos] > 0 &&
|
||||
rootPos < isoSector.Length &&
|
||||
while(rootPos < isoSector.Length &&
|
||||
isoSector[rootPos] > 0 &&
|
||||
rootPos + isoSector[rootPos] <= isoSector.Length)
|
||||
{
|
||||
int nameLen = isoSector[rootPos + 32];
|
||||
@@ -2077,8 +2077,8 @@ namespace Aaru.Core.Media.Detection
|
||||
{
|
||||
int vcdPos = vi * 2048;
|
||||
|
||||
while(isoSector[vcdPos] > 0 &&
|
||||
vcdPos < isoSector.Length &&
|
||||
while(vcdPos < isoSector.Length &&
|
||||
isoSector[vcdPos] > 0 &&
|
||||
vcdPos + isoSector[vcdPos] <= isoSector.Length)
|
||||
{
|
||||
int nameLen = isoSector[vcdPos + 32];
|
||||
@@ -2174,8 +2174,8 @@ namespace Aaru.Core.Media.Detection
|
||||
{
|
||||
int pcdPos = pi * 2048;
|
||||
|
||||
while(isoSector[pcdPos] > 0 &&
|
||||
pcdPos < isoSector.Length &&
|
||||
while(pcdPos < isoSector.Length &&
|
||||
isoSector[pcdPos] > 0 &&
|
||||
pcdPos + isoSector[pcdPos] <= isoSector.Length)
|
||||
{
|
||||
int nameLen = isoSector[pcdPos + 32];
|
||||
|
||||
Reference in New Issue
Block a user