matcha
matcha copied to clipboard
BUG: Integer underflow in email offset calculation
Describe the bug Integer underflow at fetcher/fetcher.go:400 when offset > limit. uint32 subtraction without bounds check creates large positive value.
To reproduce
- Call FetchMailboxEmails with offset=100, limit=50
- Subtraction (selectData.NumMessages - offset) underflows
- Wrong cursor position, fetches incorrect emails
Expected behavior Validate offset <= limit before subtraction
Matcha version master
OS All
Additional context File: fetcher/fetcher.go line 400 uint32 arithmetic can underflow
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.
Closing due to inactivity. Reopen if still relevant.