Merge pull request #9634 from hieblmi/fix-nil-pointer

routerrpc: add nil check for MilliSat
This commit is contained in:
Oliver Gugger 2025-03-24 11:45:30 -06:00 committed by GitHub
commit e979538cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,10 @@
`estimateroutefee` to assume probing an LSP when given an invoice with a route
hint containing a public channel to the destination.
* [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/9634) that caused
lnd to crash due to a nil pointer dereference when `estimateroutefee` is
called for a payment request that contains a zero amount.
* [Fix a bug](https://github.com/lightningnetwork/lnd/pull/9474) where LND would
fail to persist (and hence, propagate) node announcements containing address
types (such as a DNS hostname) unknown to LND.

View File

@ -519,7 +519,7 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
return nil, err
}
if *payReq.MilliSat <= 0 {
if payReq.MilliSat == nil || *payReq.MilliSat <= 0 {
return nil, errors.New("payment request amount must be " +
"greater than 0")
}