Skip to content

Conversation

@ManManavadaria
Copy link
Contributor

This PR fixes a runtime panic that occurs when accessing the Names slice in the GetContainers function.
The panic happens because the 0th index of the Names slice was accessed without validating the slice length.

Changes:

  • Added validation to check the length of the Names slice before accessing it.
  • Fallback to using containerID if a name is unavailable.

Closes #713

…er name if Names slice is empty in container summary
@dlq84
Copy link

dlq84 commented Nov 28, 2025

Having the same issue, a quick fix rollout would be nice.

@npjonath
Copy link

npjonath commented Dec 9, 2025

The related issue completely broke the latest release. It would be helpful to obtain approval and merge this branch, as it correctly fixes the issue. 👍

@jesseduffield jesseduffield merged commit f4fc366 into jesseduffield:master Dec 19, 2025
5 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 23, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazydocker](https://github.com/jesseduffield/lazydocker) | patch | `v0.24.2` → `v0.24.3` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazydocker (jesseduffield/lazydocker)</summary>

### [`v0.24.3`](https://github.com/jesseduffield/lazydocker/releases/tag/v0.24.3)

[Compare Source](jesseduffield/lazydocker@v0.24.2...v0.24.3)

#### Changelog

- [`43db69d`](jesseduffield/lazydocker@43db69d) Fix panic: validate Names slice length and use containerID as container name if Names slice is empty in container summary
- [`78edbf3`](jesseduffield/lazydocker@78edbf3) Merge pull request [#&#8203;706](jesseduffield/lazydocker#706) from nickspaargaren/upgrade-go-version-1.23
- [`f4fc366`](jesseduffield/lazydocker@f4fc366) Merge pull request [#&#8203;716](jesseduffield/lazydocker#716) from ManManavadaria/bugfix/index-out-of-range-713
- [`753c026`](jesseduffield/lazydocker@753c026) Upgrade Go version from 1.21 to 1.23 in Dockerfile
- [`322e10d`](jesseduffield/lazydocker@322e10d) Use even newer Go version
- [`3580e04`](jesseduffield/lazydocker@3580e04) Use new go version
- [`b38db60`](jesseduffield/lazydocker@b38db60) Use new setup-go version

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42NC4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] panic: runtime error: index out of range

4 participants