From bcf016f49a8be843aa38265619921d36ace417e6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 8 Feb 2018 02:59:42 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFix=20ISO9660=20when=20root=20direc?= =?UTF-8?q?tory=20is=20outside=20of=20device.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DiscImageChef.Filesystems/ISO9660/Info.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DiscImageChef.Filesystems/ISO9660/Info.cs b/DiscImageChef.Filesystems/ISO9660/Info.cs index b7afcd9a..bef7e5d6 100644 --- a/DiscImageChef.Filesystems/ISO9660/Info.cs +++ b/DiscImageChef.Filesystems/ISO9660/Info.cs @@ -254,7 +254,7 @@ namespace DiscImageChef.Filesystems.ISO9660 } } - byte[] rootDir = imagePlugin.ReadSectors(rootLocation + partition.Start, rootSize); + byte[] rootDir = new byte[0]; int rootOff = 0; bool xaExtensions = false; bool apple = false; @@ -267,6 +267,9 @@ namespace DiscImageChef.Filesystems.ISO9660 List refareas = new List(); StringBuilder suspInformation = new StringBuilder(); + if(rootLocation + rootSize < imagePlugin.Info.Sectors) + rootDir = imagePlugin.ReadSectors(rootLocation, rootSize); + BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian; // Walk thru root directory to see system area extensions in use