Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 27, 2025

No description provided.

@bagder bagder requested a review from Copilot December 27, 2025 22:36
@bagder bagder marked this pull request as ready for review December 27, 2025 22:37
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 fixes incorrect error handling for out-of-memory conditions in netrc file parsing. Previously, OOM errors from Curl_parsenetrc() would be incorrectly returned as CURLE_READ_ERROR. The fix adds an early check that immediately returns CURLE_OUT_OF_MEMORY when memory allocation fails during netrc parsing.

  • Adds explicit handling for NETRC_OUT_OF_MEMORY error code
  • Returns the appropriate CURLE_OUT_OF_MEMORY error instead of incorrectly mapping to CURLE_READ_ERROR

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

@bagder
Copy link
Member Author

bagder commented Dec 27, 2025

augment review

@augmentcode
Copy link

augmentcode bot commented Dec 27, 2025

🤖 Augment PR Summary

Summary: Treat NETRC_OUT_OF_MEMORY from Curl_parsenetrc() as a hard failure and return CURLE_OUT_OF_MEMORY immediately.

Why: Prevents OOM during .netrc handling from being misreported as a generic read error and allows callers to react appropriately.

🤖 Was this summary useful? React with 👍 or 👎

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.

@bagder bagder closed this in 2754e0f Dec 29, 2025
@bagder bagder deleted the bagder/netrc-oom branch December 29, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant