projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3db5798
)
Fix UpdateAddHTLC serialize vec capacity default
2018-08-fuzz-fixes
author
Matt Corallo
<git@bluematt.me>
Fri, 3 Aug 2018 02:21:06 +0000
(22:21 -0400)
committer
Matt Corallo
<git@bluematt.me>
Fri, 3 Aug 2018 02:37:28 +0000
(22:37 -0400)
src/ln/msgs.rs
patch
|
blob
|
history
diff --git
a/src/ln/msgs.rs
b/src/ln/msgs.rs
index f0f28c6b7a8758ee011ecb386921de4b8f45fee3..14c16e94b94de76e109baa50bb1044b0460150a5 100644
(file)
--- a/
src/ln/msgs.rs
+++ b/
src/ln/msgs.rs
@@
-937,7
+937,7
@@
impl MsgDecodable for UpdateAddHTLC {
}
impl MsgEncodable for UpdateAddHTLC {
fn encode(&self) -> Vec<u8> {
- let mut res = Vec::with_capacity(32+8+8+32+4+1
+1
366);
+ let mut res = Vec::with_capacity(32+8+8+32+4+1366);
res.extend_from_slice(&self.channel_id);
res.extend_from_slice(&byte_utils::be64_to_array(self.htlc_id));
res.extend_from_slice(&byte_utils::be64_to_array(self.amount_msat));