Skip to content

BUG: Signed/unsigned comparison in email cursor calculation #810

@andrinoff

Description

@andrinoff

Describe the bug
Cursor calculation at fetcher/fetcher.go:407 mixes uint32 and int. Type coercion causes incorrect offset with large values.

To reproduce

  1. Pass large limit value (> max int on 32-bit)
  2. chunkSize cast to uint32 overflows
  3. Wrong from position calculated

Expected behavior
Use consistent types or validate range

Matcha version
master

OS
32-bit systems primarily

Additional context
File: fetcher/fetcher.go line 407
Type safety issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions