Skip to content

cookie. return proper error on OOM#19992

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/cookie-oom
Closed

cookie. return proper error on OOM#19992
bagder wants to merge 1 commit into
masterfrom
bagder/cookie-oom

Conversation

@bagder

@bagder bagder commented Dec 16, 2025

Copy link
Copy Markdown
Member

Follow-up to a78a07d

@bagder bagder added the cookies label Dec 16, 2025
@bagder
bagder requested a review from Copilot December 16, 2025 08:12
@github-actions github-actions Bot added the HTTP label Dec 16, 2025
@bagder

bagder commented Dec 16, 2025

Copy link
Copy Markdown
Member Author

augment review

@bagder
bagder marked this pull request as ready for review December 16, 2025 08:12

@augmentcode augmentcode Bot 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.

Review completed. No suggestions at this time.

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

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.

Pull request overview

This PR fixes an error handling issue in the Curl_cookie_add function where an out-of-memory (OOM) condition was not properly reported. When Curl_memdup fails to allocate memory for cloning a cookie structure from stack to heap, the function now correctly sets result = CURLE_OUT_OF_MEMORY before jumping to the error handling path.

Key changes:

  • Added proper error code assignment (CURLE_OUT_OF_MEMORY) when memory allocation fails during cookie cloning

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

@bagder bagder closed this in 222fce0 Dec 16, 2025
@bagder
bagder deleted the bagder/cookie-oom branch December 16, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants