]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix UpdateAddHTLC serialize vec capacity default 2018-08-fuzz-fixes
authorMatt Corallo <git@bluematt.me>
Fri, 3 Aug 2018 02:21:06 +0000 (22:21 -0400)
committerMatt Corallo <git@bluematt.me>
Fri, 3 Aug 2018 02:37:28 +0000 (22:37 -0400)
src/ln/msgs.rs

index f0f28c6b7a8758ee011ecb386921de4b8f45fee3..14c16e94b94de76e109baa50bb1044b0460150a5 100644 (file)
@@ -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+1366);
+               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));