Skip to content

imap: do size checks using 64-bit math - #23100

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/imap-check
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/imap-check

Conversation

@bagder

@bagder bagder commented Sep 25, 2026

Copy link
Copy Markdown
Member

To make them evaluate correctly also on 32-bit platforms.

Reported-by: Mohammed K. Fathy

To make them evaluate correctly also on 32-bit platforms.

Reported-by: Mohammed K. Fathy

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

Both targeted comparisons now avoid 32-bit truncation while preserving safe bounded conversions.

Review effort: Balanced
Findings: None

What changed in this PR

Corrects IMAP literal-size comparisons on 32-bit platforms by performing them using curl_off_t.

Changes:

  • Prevents truncation when comparing buffered chunks against large IMAP literal sizes.
  • Applies the fix to LIST/SEARCH and FETCH responses.
File Description
lib/​imap.c Uses 64-bit size comparisons for IMAP literals.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bagder
bagder marked this pull request as ready for review September 25, 2026 12:30
@bagder bagder closed this in bdaff23 Sep 25, 2026
@bagder
bagder deleted the bagder/imap-check branch September 25, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants