]> git.bitcoin.ninja Git - rust-lightning/commit
Rely on Error/Warning message data lengths being correct 2021-07-warning-msgs
authorMatt Corallo <git@bluematt.me>
Fri, 7 Jan 2022 20:11:31 +0000 (20:11 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 11 Jan 2022 20:25:24 +0000 (20:25 +0000)
commitd786bfaef27b9e49f71ac5b8bf5a4e02cd484f79
tree38a215940f415567016ad4998c5a75cda01e9573
parent2d7b06e6194df42f171bde203500fe10e8b28370
Rely on Error/Warning message data lengths being correct

In https://github.com/lightning/bolts/pull/950, the (somewhat
strange) requirement that error messages be handled even if the
length field is set larger than the size of the package was
removed. Here we change the code to drop the special handling for
this, opting to just fail to read the message if the length is
incorrect.
lightning/src/ln/msgs.rs