interledger / interledger-rs

An easy-to-use, high-performance Interledger implementation written in Rust
http://interledger.rs
Other
201 stars 70 forks source link

Custom (de)serialization code cleanup #688

Closed koivunej closed 3 years ago

koivunej commented 3 years ago

Assorted cleanup commits while looking into the bytes04, bytes05 issues. This is mostly idle work while thinking for the path forwards towards tokio-1.0 but publishing the PR for review.

Among fixes is the 0x80 case is currently a panic on the packet/btp as the 0 is forwarded to byteorder::ReadBytesExt::read_uint which requires 1 <= n <= 8. This was found while fuzzing which I didn't include at least yet, as for some reason the longer length cases weren't found with the naive fuzz target.

koivunej commented 3 years ago

Quite sure the test-md failure is transient.

koivunej commented 3 years ago

Closing this in favor of #690.