matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Buffer boundary not validated in MIME parsing

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug MIME boundary extraction at fetcher/fetcher.go:1120 doesn't validate endIdx > 0 before accessing endIdx-1. Boundary at position 0 causes panic.

To reproduce

  1. Send email with malformed MIME boundary at position 0
  2. Access rawEmail[endIdx-1] when endIdx=0
  3. Index out of bounds panic

Expected behavior Check endIdx > 1 before accessing endIdx-1

Matcha version master

OS All

Additional context File: fetcher/fetcher.go line 1120 Edge case in malformed MIME

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