From 689998786452172a9c17d8da48321c594b4eed11 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 5 Aug 2022 18:45:38 +0200 Subject: [PATCH] Fix decrypted reading with the offset is bigger than UINT32_MAX --- source/WUD/DiscReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WUD/DiscReader.cpp b/source/WUD/DiscReader.cpp index d534071..5c9fe64 100644 --- a/source/WUD/DiscReader.cpp +++ b/source/WUD/DiscReader.cpp @@ -81,7 +81,7 @@ bool DiscReader::readDecrypted(uint8_t *out_buffer, uint64_t clusterOffset, uint uint32_t blockNumber = (totalOffset / BLOCK_SIZE); uint32_t blockOffset = (totalOffset % BLOCK_SIZE); - readOffset = (blockNumber * BLOCK_SIZE); + readOffset = ((uint64_t) blockNumber * BLOCK_SIZE); if (!useFixedIV) { memset(usedIV, 0, 16); uint64_t ivTemp = usedFileOffset >> 16;