Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
#407: fixed: rar-rename may fail to read encrypted rar3-archives
Browse files Browse the repository at this point in the history
  • Loading branch information
hugbug committed Jul 1, 2017
1 parent 35e65e7 commit 17fbb79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions daemon/postprocess/RarReader.cpp
Expand Up @@ -268,6 +268,12 @@ RarVolume::RarBlock RarVolume::ReadRar3Block(DiskFile& file)
uint16 size = ((uint16)buf[6] << 8) + buf[5];

uint32 blocksize = size;
if (m_encrypted)
{
// Align to 16 bytes
blocksize = (blocksize + ((~blocksize + 1) & (16 - 1)));
}

block.trailsize = blocksize - sizeof(buf);

uint8 addbuf[4];
Expand Down

0 comments on commit 17fbb79

Please sign in to comment.