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
- Send email with malformed MIME boundary at position 0
- Access rawEmail[endIdx-1] when endIdx=0
- 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
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
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