Skip to content

Commit d7ed4c6

Browse files
committed
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()
1 parent c3e2255 commit d7ed4c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use ln::msgs::DecodeError;
1313

1414
use util::byte_utils::{be64_to_array, be32_to_array, be16_to_array, slice_to_be16, slice_to_be32, slice_to_be64};
1515

16-
const MAX_BUF_SIZE: usize = 16 * 1024;
16+
const MAX_BUF_SIZE: usize = 64 * 1024;
1717

1818
pub struct Writer<W> { writer: W }
1919
pub struct Reader<R> { reader: R }

0 commit comments

Comments
 (0)