Return a RunTimeException if the input for the TMD was not valid.

This commit is contained in:
Maschell 2018-12-06 15:33:48 +01:00
parent 7b27478160
commit b016295e9f

View File

@ -108,6 +108,9 @@ public final class TMD {
}
public static TMD parseTMD(byte[] input) {
if (input == null || input.length == 0) {
throw new RuntimeException("Invalid TMD file.");
}
byte[] signature = new byte[SIGNATURE_LENGTH];
byte[] issuer = new byte[ISSUER_LENGTH];
byte[] reserved = new byte[RESERVED_LENGTH];