Commit 58b9a9aa authored by John Peterson's avatar John Peterson Committed by Jean-Baptiste Kempf

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>
(cherry picked from commit 0ea07fba5ac7677c715664d370c85cbf8ce01d95)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 37fc3d99
......@@ -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