We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8570fd9 commit b9fcc37Copy full SHA for b9fcc37
lightning/src/offers/parse.rs
@@ -68,6 +68,7 @@ impl<T: SeekReadable> TryFrom<Vec<u8>> for ParsedMessage<T> {
68
let mut cursor = io::Cursor::new(bytes);
69
let tlv_stream: T = SeekReadable::read(&mut cursor)?;
70
71
+ // Ensure that there are no more TLV records left to parse.
72
if cursor.position() < cursor.get_ref().len() as u64 {
73
return Err(DecodeError::InvalidValue);
74
}
0 commit comments