Skip to content

tool_formparse: pass on errors from my_get_line when reading headers#20963

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/formparse-error
Closed

tool_formparse: pass on errors from my_get_line when reading headers#20963
bagder wants to merge 1 commit intomasterfrom
bagder/formparse-error

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 17, 2026

The read_field_headers() function would return "ok" even if the underlying file read returned error, thus would the parent not become aware of the problem.

Follow-up to f847d2e

Found by Codex Security

The read_field_headers() function would return "ok" even if the
underlying file read returned error, thus would the parent not become
aware of the problem.

Follow-up to f847d2e

Found by Codex Security
Copy link
Copy Markdown

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

Ensures the curl tool’s form header-file parsing propagates underlying my_get_line() read failures so callers can detect and abort instead of incorrectly treating the read as successful.

Changes:

  • Detect my_get_line()/get_line() signaled read failure via the error flag after the header-reading loop.
  • Emit an error message and return failure from read_field_headers() when such a read error occurs.

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

You can also share your feedback on Copilot code review. Take the survey.

@bagder bagder marked this pull request as ready for review March 17, 2026 15:49
@bagder bagder closed this in 80b6cd9 Mar 17, 2026
@bagder bagder deleted the bagder/formparse-error branch March 17, 2026 22:42
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