mirror of
https://github.com/docker/compose.git
synced 2026-09-04 00:56:00 +00:00
The condition for checking container restart state had incorrect operator precedence. The expression: inspect.State != nil && inspect.State.Restarting || inspect.State.Running is evaluated as: (inspect.State != nil && inspect.State.Restarting) || inspect.State.Running This means if inspect.State is nil and inspect.State.Restarting is false (which would trigger a panic), the code would attempt to access inspect.State.Running, causing a nil pointer dereference. This fix adds parentheses to ensure the nil check applies to both state checks: inspect.State != nil && (inspect.State.Restarting || inspect.State.Running) Signed-off-by: Nepomuk Crhonek <105591323+Nepomuk5665@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| api | ||
| bridge | ||
| compose | ||
| dryrun | ||
| e2e | ||
| mocks | ||
| remote | ||
| utils | ||
| watch | ||