mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 23:30:59 +01:00
Correct MAX_BUF_SIZE in serialization
I think this might have been my fault due to faulty review feedback, but fuzzer caught trivial crash here where you try to send a ping message larger than 16KB (but smaller than the max-length 64KB) and you crash as message serialization is unwrap()
This commit is contained in:
parent
c3e225597d
commit
d7ed4c63e7
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ use ln::msgs::DecodeError;
|
||||||
|
|
||||||
use util::byte_utils::{be64_to_array, be32_to_array, be16_to_array, slice_to_be16, slice_to_be32, slice_to_be64};
|
use util::byte_utils::{be64_to_array, be32_to_array, be16_to_array, slice_to_be16, slice_to_be32, slice_to_be64};
|
||||||
|
|
||||||
const MAX_BUF_SIZE: usize = 16 * 1024;
|
const MAX_BUF_SIZE: usize = 64 * 1024;
|
||||||
|
|
||||||
pub struct Writer<W> { writer: W }
|
pub struct Writer<W> { writer: W }
|
||||||
pub struct Reader<R> { reader: R }
|
pub struct Reader<R> { reader: R }
|
||||||
|
|
Loading…
Add table
Reference in a new issue