Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 26, 2025

Found with strict torture testing.

Found with strict torture testing.
@bagder bagder added the FTP label Dec 26, 2025
@bagder bagder requested a review from Copilot December 26, 2025 09:29
@bagder bagder marked this pull request as ready for review December 26, 2025 09:29
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 improves error handling in the FTP implementation by ensuring proper early returns when out-of-memory (OOM) errors occur. The changes prevent execution of potentially risky operations when memory allocation has failed, found through strict torture testing.

  • Added OOM check before attempting EPSV fallback to prevent resource cleanup with invalid state
  • Added early return for OOM errors during secondary socket connection to avoid potential undefined behavior

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

@bagder
Copy link
Member Author

bagder commented Dec 26, 2025

augment review

@augmentcode
Copy link

augmentcode bot commented Dec 26, 2025

🤖 Augment PR Summary

Summary: Improve FTP out-of-memory handling by avoiding protocol-fallback paths that would mask OOM.
Changes: Skip EPSV-disable retry logic on OOM and return early when Curl_conn_connect() reports CURLE_OUT_OF_MEMORY.

🤖 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 abcb10f Dec 26, 2025
@bagder bagder deleted the bagder/ftp-oom branch December 26, 2025 09:49
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