diff --git a/CD/ATIP.cs b/CD/ATIP.cs index 9cffe6f..e6bb61e 100644 --- a/CD/ATIP.cs +++ b/CD/ATIP.cs @@ -48,7 +48,8 @@ namespace Aaru.Decoders.CD { public static CDATIP? Decode(byte[] CDATIPResponse) { - if(CDATIPResponse == null) + if(CDATIPResponse == null || + CDATIPResponse.Length <= 4) return null; var decoded = new CDATIP(); diff --git a/CD/CDTextOnLeadIn.cs b/CD/CDTextOnLeadIn.cs index 4baead9..96ad03b 100644 --- a/CD/CDTextOnLeadIn.cs +++ b/CD/CDTextOnLeadIn.cs @@ -84,7 +84,8 @@ namespace Aaru.Decoders.CD public static CDText? Decode(byte[] CDTextResponse) { - if(CDTextResponse == null) + if(CDTextResponse == null || + CDTextResponse.Length <= 4) return null; var decoded = new CDText diff --git a/CD/FullTOC.cs b/CD/FullTOC.cs index 8ced7a4..a582480 100644 --- a/CD/FullTOC.cs +++ b/CD/FullTOC.cs @@ -55,7 +55,8 @@ namespace Aaru.Decoders.CD public static CDFullTOC? Decode(byte[] CDFullTOCResponse) { - if(CDFullTOCResponse == null) + if(CDFullTOCResponse == null || + CDFullTOCResponse.Length <= 4) return null; var decoded = new CDFullTOC diff --git a/CD/PMA.cs b/CD/PMA.cs index 816516e..7024710 100644 --- a/CD/PMA.cs +++ b/CD/PMA.cs @@ -47,7 +47,8 @@ namespace Aaru.Decoders.CD { public static CDPMA? Decode(byte[] CDPMAResponse) { - if(CDPMAResponse == null) + if(CDPMAResponse == null || + CDPMAResponse.Length <= 4) return null; var decoded = new CDPMA diff --git a/CD/Session.cs b/CD/Session.cs index 8cd7d59..6bf329e 100644 --- a/CD/Session.cs +++ b/CD/Session.cs @@ -47,7 +47,8 @@ namespace Aaru.Decoders.CD { public static CDSessionInfo? Decode(byte[] CDSessionInfoResponse) { - if(CDSessionInfoResponse == null) + if(CDSessionInfoResponse == null || + CDSessionInfoResponse.Length <= 4) return null; var decoded = new CDSessionInfo diff --git a/CD/TOC.cs b/CD/TOC.cs index 4a6fffb..9ff89c2 100644 --- a/CD/TOC.cs +++ b/CD/TOC.cs @@ -48,7 +48,8 @@ namespace Aaru.Decoders.CD { public static CDTOC? Decode(byte[] CDTOCResponse) { - if(CDTOCResponse == null) + if(CDTOCResponse == null || + CDTOCResponse.Length <= 4) return null; var decoded = new CDTOC