You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: nil pointer dereference in CapacityReservationFromEC2 for Interruptible field
lo.Ternary eagerly evaluates all arguments in Go, so
lo.Ternary(cr.Interruptible == nil, false, *cr.Interruptible)
dereferences *cr.Interruptible unconditionally, panicking when
the pointer is nil. This is the default for all standard ODCRs
and capacity blocks returned by the EC2 API.
Replace with lo.FromPtrOr which safely returns the default value
when the pointer is nil.
Also adds a test case with nil Interruptible to prevent regression.
Fixes#9079
0 commit comments