Skip to content

jmap_mail.c: clamp Email/query anchorOffset to the result count - #6247

Open
rjbs wants to merge 1 commit into
cyrusimap:masterfrom
rjbs:cyr-3169-emailquery-anchoroffset
Open

jmap_mail.c: clamp Email/query anchorOffset to the result count#6247
rjbs wants to merge 1 commit into
cyrusimap:masterfrom
rjbs:cyr-3169-emailquery-anchoroffset

Conversation

@rjbs

@rjbs rjbs commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

anchorOffset could put the theoretical start position past the total size of the result set, so the remaining count was computed from a position outside it. Clamp the position to the total, as the negative side already is.

anchorOffset could put the theoretical start position past the total size of
the result set, so the remaining count was computed from a position outside
it.  Clamp the position to the total, as the negative side already is.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants