|
Ran
|
Jobs
1
|
Files
91
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#6140: p2p: Error on RawNetworkMessage decode if payload partly consumed <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/760a278dad6d31bbc82cc9cef86a191b1c0fda0c">760a278da<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/600eba9fe74740d417b6e9427d059938b11f3ce1"> p2p: Error on RawNetworkMessage decode if payload partly consumed (Mitchell Bagot) <a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/f3bcb5192bac3d83be0869207c85583ae4de58bf">f3bcb5192</a> p2p: Fix Inventory::Error roundtrip (Mitchell Bagot) Pull request description: The RawNetworkMessage Decodable implementation currently checks that the payload length provided in the header is readable from the provided reader. However, it does not check that the process of decoding the payload actually consumes as many bytes to construct a valid data object. This means that it successfully decodes malformed network messages such as those with a payload len of 50 for a MemPool command. In the process of fixing this, the Inventory decode must also be adjusted to fix the roundtrip behaviour. - Patch 1 adjusts the Inventory::Error Decodable behaviour to consume the 32 zero hash bytes. - Patch 2 adjusts RawNetworkMessage Decodable impl to return a parse error when decoding of the payload does not consume all bytes read according to the header's payload_len. ACKs for top commit: apoelstra: ACK 760a278dad6d31bbc82cc9cef86a191b1c0fda0c; successfully ran local tests Tree-SHA512: cf36733d5be7de285aa42c80dd0e8fb4cb9
24 of 30 new or added lines in 2 files covered. (80.0%)
1 existing line in 1 file now uncovered.16544 of 20214 relevant lines covered (81.84%)
17648.7 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 6 |
92.21 |
-0.57% | bitcoin/src/p2p/message.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
85.3 |
-0.07% | bitcoin/src/psbt/mod.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 25604189264.1 | 91 |
81.84 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|