matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Missing boundary validation in filepicker cursor

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug Filepicker at tui/filepicker.go:178 accesses m.items[m.cursor] without bounds check. Rapid directory changes cause panic.

To reproduce

  1. Navigate to directory with many items
  2. Position cursor at bottom
  3. Rapidly change to directory with fewer items
  4. Cursor > len(items), panic

Expected behavior Validate cursor < len(items) before access

Matcha version master

OS All

Additional context File: tui/filepicker.go line 178 Index out of bounds panic

andrinoff avatar Apr 21 '26 14:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 22 '26 06:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar Jun 04 '26 19:06 floatpanebot