Fix amount overflow in Offer parsing and building
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 15 Feb 2023 22:43:41 +0000 (16:43 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 24 Feb 2023 00:25:50 +0000 (18:25 -0600)
commit32ed69a2bd3971e16f099ca721fa43b633309c77
treeb6ec325d4a63696e1ea9bf47c04d592605ffa9a5
parent3d41df025de4df512e8486c9e321fcda8d1a2420
Fix amount overflow in Offer parsing and building

An overflow can occur when multiplying the offer amount by the requested
quantity when checking if the given amount is enough. Return an error
instead of overflowing.
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs