Deleted Added
full compact
archive_read_support_format_rar5.c (349524) archive_read_support_format_rar5.c (349900)
1/*-
2* Copyright (c) 2018 Grzegorz Antoniak (http://antoniak.org)
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions
7* are met:
8* 1. Redistributions of source code must retain the above copyright

--- 609 unchanged lines hidden (view full) ---

618 circular_memcpy(rar->cstate.filtered_buf,
619 rar->cstate.window_buf, rar->cstate.window_mask,
620 rar->cstate.solid_offset + flt->block_start,
621 rar->cstate.solid_offset + flt->block_start + flt->block_length);
622
623 for(i = 0; i < flt->block_length - 3; i += 4) {
624 uint8_t* b = &rar->cstate.window_buf[
625 (rar->cstate.solid_offset +
1/*-
2* Copyright (c) 2018 Grzegorz Antoniak (http://antoniak.org)
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions
7* are met:
8* 1. Redistributions of source code must retain the above copyright

--- 609 unchanged lines hidden (view full) ---

618 circular_memcpy(rar->cstate.filtered_buf,
619 rar->cstate.window_buf, rar->cstate.window_mask,
620 rar->cstate.solid_offset + flt->block_start,
621 rar->cstate.solid_offset + flt->block_start + flt->block_length);
622
623 for(i = 0; i < flt->block_length - 3; i += 4) {
624 uint8_t* b = &rar->cstate.window_buf[
625 (rar->cstate.solid_offset +
626 flt->block_start + i) & rar->cstate.window_mask];
626 flt->block_start + i + 3) & rar->cstate.window_mask];
627
627
628 if(b[3] == 0xEB) {
628 if(*b == 0xEB) {
629 /* 0xEB = ARM's BL (branch + link) instruction. */
630 offset = read_filter_data(rar,
631 (rar->cstate.solid_offset + flt->block_start + i) &
632 rar->cstate.window_mask) & 0x00ffffff;
633
634 offset -= (uint32_t) ((i + flt->block_start) / 4);
635 offset = (offset & 0x00ffffff) | 0xeb000000;
636 write_filter_data(rar, (uint32_t)i, offset);

--- 3399 unchanged lines hidden ---
629 /* 0xEB = ARM's BL (branch + link) instruction. */
630 offset = read_filter_data(rar,
631 (rar->cstate.solid_offset + flt->block_start + i) &
632 rar->cstate.window_mask) & 0x00ffffff;
633
634 offset -= (uint32_t) ((i + flt->block_start) / 4);
635 offset = (offset & 0x00ffffff) | 0xeb000000;
636 write_filter_data(rar, (uint32_t)i, offset);

--- 3399 unchanged lines hidden ---