From a5bc706cb97ac9970c4b25a5521e89771420d11c Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 7 Apr 2019 00:12:20 +0200 Subject: [PATCH] Fixing the IV for certain reads --- src/de/mas/wiiu/jnus/utils/cryptography/NUSDecryption.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/mas/wiiu/jnus/utils/cryptography/NUSDecryption.java b/src/de/mas/wiiu/jnus/utils/cryptography/NUSDecryption.java index 73fd53d..abeef76 100644 --- a/src/de/mas/wiiu/jnus/utils/cryptography/NUSDecryption.java +++ b/src/de/mas/wiiu/jnus/utils/cryptography/NUSDecryption.java @@ -116,7 +116,7 @@ public class NUSDecryption extends AESDecryption { // current IV. if (skipoffset > 0) { int skippedBytes = StreamUtils.getChunkFromStream(inputStream, blockBuffer, overflow, skipoffset); - if (skippedBytes > 16) { + if (skippedBytes >= 16) { IV = Arrays.copyOfRange(blockBuffer, skippedBytes - 16, skippedBytes); } skipoffset = 0;