From da196e845feb678eff58c184a339ffbeedfcd305 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 30 Apr 2019 14:26:02 +0200 Subject: [PATCH] Force an 0x10 alignment of the offset when trying to decrypt a file --- .../mas/wiiu/jnus/implementations/FSTDataProviderNUSTitle.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de/mas/wiiu/jnus/implementations/FSTDataProviderNUSTitle.java b/src/de/mas/wiiu/jnus/implementations/FSTDataProviderNUSTitle.java index d434e23..0bb54a7 100644 --- a/src/de/mas/wiiu/jnus/implementations/FSTDataProviderNUSTitle.java +++ b/src/de/mas/wiiu/jnus/implementations/FSTDataProviderNUSTitle.java @@ -84,6 +84,9 @@ public class FSTDataProviderNUSTitle implements FSTDataProvider, HasNUSTitle { outputStream.close(); return false; } + if (offset % 16 != 0) { + throw new IOException("The offset for decryption need to be aligned to 16"); + } Content c = title.getTMD().getContentByIndex(entry.getContentIndex());