lightningnetwork / lightning-onion

Onion Routed Micropayments for the Lightning Network
MIT License
396 stars 125 forks source link

Add payload length check #45

Closed joostjager closed 4 years ago

joostjager commented 4 years ago

This PR adds a max routing info length check to prevent a crash if a payment path is passed in that exceeds this size.

Furthermore the NumMaxHops constant is increased to accommodate for the smaller tlv payloads. This prevents out of bounds errors when using the PaymentPath struct.

joostjager commented 4 years ago

Forgot to request re-review