Merge pull request #7227 from Crypt-iQ/tlv_change_to_p2p

multi: update to tlv/v1.1.0 and use new *P2P tlv decoding variants
This commit is contained in:
Oliver Gugger authored and GitHub committed 2022-12-05 23:11:30 +01:00
commit 625c6f1949
6 files changed
+16 -6

No files matched your search

+3 -1
View File
@@ -5781,7 +5781,9 @@ func marshalExtraOpaqueData(data []byte) map[uint64][]byte {
return nil
}
parsedTypes, err := tlvStream.DecodeWithParsedTypes(r)
// Since ExtraOpaqueData is provided by a potentially malicious peer,
// pass it into the P2P decoding variant.
parsedTypes, err := tlvStream.DecodeWithParsedTypesP2P(r)
if err != nil || len(parsedTypes) == 0 {
return nil
}