Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 9, 2025

Pointed out by ZeroPath

@github-actions github-actions bot added the IMAP label Dec 9, 2025
@bagder bagder marked this pull request as ready for review December 9, 2025 09:06
@bagder bagder requested a review from Copilot December 9, 2025 09:29
@bagder
Copy link
Member Author

bagder commented Dec 9, 2025

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a buffer length check before accessing buffer data at an offset in the IMAP SELECT response handler. The change prevents potential out-of-bounds memory access when parsing UIDVALIDITY responses from IMAP servers by verifying the buffer length before accessing line[2]. This is a security fix pointed out by ZeroPath.

Key Changes:

  • Moved buffer pointer and length retrieval to be scoped within the condition where they're used
  • Added length check (len > 2) before accessing buffer at offset 2

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 43c781a Dec 9, 2025
@bagder bagder deleted the bagder/imap-len branch December 9, 2025 09:51
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.

1 participant