Skip to content

Commit 2795572

Browse files
committed
Removed header check in chunk_size_and_padding function
1 parent 6b123c4 commit 2795572

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
## Removed
9+
- Check for chunk header in `chunk_size_and_padding` function
10+
711
## [0.2.4] - 2022-03-28
812
## Changed
913
- pack\_pages function now return an empty byte when given an empty list instead of throwing an exception.
@@ -42,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4246
- Fixed bug in extractusm that causes it to fail when output directory doesn't exist.
4347
- Fixed bug where program fails when directory exists.
4448

49+
[Unreleased]: https://github.com/donmai-me/WannaCRI/compare/0.2.4...HEAD
4550
[0.2.4]: https://github.com/donmai-me/WannaCRI/compare/0.2.3...0.2.4
4651
[0.2.3]: https://github.com/donmai-me/WannaCRI/compare/0.2.2...0.2.3
4752
[0.2.2]: https://github.com/donmai-me/WannaCRI/compare/0.2.1...0.2.2

wannacri/usm/tools.py

-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ def is_payload_list_pages(payload: bytes) -> bool:
5353

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

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

0 commit comments

Comments
 (0)