mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Check to prevent overflow on cut MMC FEATURES decoding.
This commit is contained in:
Binary file not shown.
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
@@ -5777,7 +5777,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
|||||||
uint offset = 8;
|
uint offset = 8;
|
||||||
List<FeatureDescriptor> descLst = new List<FeatureDescriptor>();
|
List<FeatureDescriptor> descLst = new List<FeatureDescriptor>();
|
||||||
|
|
||||||
while(offset < response.Length)
|
while((offset + 4) < response.Length)
|
||||||
{
|
{
|
||||||
FeatureDescriptor desc = new FeatureDescriptor();
|
FeatureDescriptor desc = new FeatureDescriptor();
|
||||||
desc.Code = (ushort)((response[offset + 0] << 8) + response[offset + 1]);
|
desc.Code = (ushort)((response[offset + 0] << 8) + response[offset + 1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user