aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_rar5.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-06-27 13:37:34 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-06-27 13:37:34 +0000
commit085fce401bac81381be296026985e704e94a99e2 (patch)
treea699c379fc1ca7d6eeb028253359da411e8a6231 /libarchive/archive_read_support_format_rar5.c
parentc31a08f64d5475900060540bea0d534466f88f6e (diff)
downloadsrc-085fce401bac81381be296026985e704e94a99e2.tar.gz
src-085fce401bac81381be296026985e704e94a99e2.zip
Update vendor/libarchive/dist to git d6d3799d6b309593f271c4c319dfba92efc95772
Relevant vendor changes: PR #1217: RAR5 reader - fix ARM filter going beyond window buffer boundary (OSS-Fuzz 15431) PR #1218: Fixes to sparse file handling
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=349454
Diffstat (limited to 'libarchive/archive_read_support_format_rar5.c')
-rw-r--r--libarchive/archive_read_support_format_rar5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libarchive/archive_read_support_format_rar5.c b/libarchive/archive_read_support_format_rar5.c
index 95579e15cf05..e58cbbf6d829 100644
--- a/libarchive/archive_read_support_format_rar5.c
+++ b/libarchive/archive_read_support_format_rar5.c
@@ -623,9 +623,9 @@ static int run_arm_filter(struct rar5* rar, struct filter_info* flt) {
for(i = 0; i < flt->block_length - 3; i += 4) {
uint8_t* b = &rar->cstate.window_buf[
(rar->cstate.solid_offset +
- flt->block_start + i) & rar->cstate.window_mask];
+ flt->block_start + i + 3) & rar->cstate.window_mask];
- if(b[3] == 0xEB) {
+ if(*b == 0xEB) {
/* 0xEB = ARM's BL (branch + link) instruction. */
offset = read_filter_data(rar,
(rar->cstate.solid_offset + flt->block_start + i) &