Skip to content

Commit

Permalink
Removed header check in chunk_size_and_padding function
Browse files Browse the repository at this point in the history
  • Loading branch information
donmai-me committed Mar 30, 2022
1 parent 6b123c4 commit 2795572
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Removed
- Check for chunk header in `chunk_size_and_padding` function

## [0.2.4] - 2022-03-28
## Changed
- pack\_pages function now return an empty byte when given an empty list instead of throwing an exception.
Expand Down Expand Up @@ -42,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed bug in extractusm that causes it to fail when output directory doesn't exist.
- Fixed bug where program fails when directory exists.

[Unreleased]: https://github.com/donmai-me/WannaCRI/compare/0.2.4...HEAD
[0.2.4]: https://github.com/donmai-me/WannaCRI/compare/0.2.3...0.2.4
[0.2.3]: https://github.com/donmai-me/WannaCRI/compare/0.2.2...0.2.3
[0.2.2]: https://github.com/donmai-me/WannaCRI/compare/0.2.1...0.2.2
Expand Down
3 changes: 0 additions & 3 deletions wannacri/usm/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def is_payload_list_pages(payload: bytes) -> bool:

def chunk_size_and_padding(header: bytes) -> Tuple[int, int]:
header = bytearray(header)
signature = header[0:4]
if not is_valid_chunk(signature):
raise ValueError("Invalid signature")

size = int.from_bytes(header[4:8], "big")
offset = header[9]
Expand Down

0 comments on commit 2795572

Please sign in to comment.