mirror of
https://github.com/wiiu-env/wudd.git
synced 2024-11-25 03:06:57 +01:00
Fix decrypted reading with the offset is bigger than UINT32_MAX
This commit is contained in:
parent
f09f8f2b29
commit
6899987864
@ -81,7 +81,7 @@ bool DiscReader::readDecrypted(uint8_t *out_buffer, uint64_t clusterOffset, uint
|
|||||||
uint32_t blockNumber = (totalOffset / BLOCK_SIZE);
|
uint32_t blockNumber = (totalOffset / BLOCK_SIZE);
|
||||||
uint32_t blockOffset = (totalOffset % BLOCK_SIZE);
|
uint32_t blockOffset = (totalOffset % BLOCK_SIZE);
|
||||||
|
|
||||||
readOffset = (blockNumber * BLOCK_SIZE);
|
readOffset = ((uint64_t) blockNumber * BLOCK_SIZE);
|
||||||
if (!useFixedIV) {
|
if (!useFixedIV) {
|
||||||
memset(usedIV, 0, 16);
|
memset(usedIV, 0, 16);
|
||||||
uint64_t ivTemp = usedFileOffset >> 16;
|
uint64_t ivTemp = usedFileOffset >> 16;
|
||||||
|
Loading…
Reference in New Issue
Block a user