mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Check MMC features length before copying array.
This commit is contained in:
Binary file not shown.
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
@@ -5782,6 +5782,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
FeatureDescriptor desc = new FeatureDescriptor();
|
||||
desc.Code = (ushort)((response[offset + 0] << 8) + response[offset + 1]);
|
||||
desc.Data = new byte[response[offset + 3] + 4];
|
||||
if (desc.Data.Length + offset > response.Length)
|
||||
desc.Data = new byte[response.Length - offset];
|
||||
Array.Copy(response, offset, desc.Data, 0, desc.Data.Length);
|
||||
offset += (uint)(desc.Data.Length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user