Commit 0ea07fba authored by John Peterson's avatar John Peterson Committed by Laurent Aimar

rar: Read the uncompressed size high word instead of the compressed size high word

For multi-volume archives the compressed size refers to the size of the data in the volume rather than the entire archive.
Signed-off-by: default avatarLaurent Aimar <fenrir@videolan.org>
parent 3649531c
......@@ -175,7 +175,7 @@ static int SkipFile(stream_t *s, int *count, rar_file_t ***file,
uint16_t name_size = GetWLE(&peek[7+19]);
uint32_t file_size_high = 0;
if (hdr->flags & RAR_BLOCK_FILE_HAS_HIGH)
file_size_high = GetDWLE(&peek[7+25]);
file_size_high = GetDWLE(&peek[7+29]);
const uint64_t file_size = ((uint64_t)file_size_high << 32) | file_size_low;
char *name = calloc(1, name_size + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment