We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b13853 commit d1f7efdCopy full SHA for d1f7efd
lightning/src/offers/parse.rs
@@ -90,6 +90,7 @@ impl<T: SeekReadable> TryFrom<Vec<u8>> for ParsedMessage<T> {
90
let mut cursor = io::Cursor::new(bytes);
91
let tlv_stream: T = SeekReadable::read(&mut cursor)?;
92
93
+ // Ensure that there are no more TLV records left to parse.
94
if cursor.position() < cursor.get_ref().len() as u64 {
95
return Err(DecodeError::InvalidValue);
96
}
0 commit comments