Do not try to read DiscJuggler descriptors if there are none.

This commit is contained in:
2020-11-07 01:15:12 +00:00
parent 9dd318310b
commit 9df1fd7c15

View File

@@ -58,8 +58,9 @@ namespace Aaru.DiscImages
_imageStream.Read(descriptor, 0, dscLen);
// Sessions
if(descriptor[0] > 99 ||
descriptor[0] == 0)
if(descriptor.Length < 1 ||
descriptor[0] > 99 ||
descriptor[0] == 0)
return false;
// Seems all sessions start with this data