Skip to content

RDKB-64641 sets post_data = NULL to keep getPost() unset for file-only multipart bodies - #27

Merged
pavankumar464 merged 5 commits into
developfrom
bug/RDKB-64641
Jul 14, 2026
Merged

RDKB-64641 sets post_data = NULL to keep getPost() unset for file-only multipart bodies#27
pavankumar464 merged 5 commits into
developfrom
bug/RDKB-64641

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor
  • In process_multipart_form_data, replace post_data = content_data with post_data = strdup(content_data) when there are no non-file fields.
  • content_data is freed by caller (ccsp_post_module_open), so aliasing caused double-free/heap corruption.
  • Prevents crash pattern seen as SIGSEGV/SIGABRT in core dumps.

- In process_multipart_form_data, replace post_data = content_data with post_data = strdup(content_data) when there are no non-file fields.

- content_data is freed by caller (ccsp_post_module_open), so aliasing caused double-free/heap corruption.

- Prevents crash pattern seen as SIGSEGV/SIGABRT in core dumps.
@pavankumar464
pavankumar464 requested a review from a team as a code owner July 9, 2026 03:00
Copilot AI review requested due to automatic review settings July 9, 2026 03:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a double-free/heap corruption in the multipart POST parsing fallback path by ensuring post_data does not alias content_data (which is freed by ccsp_post_module_open after parsing).

Changes:

  • In process_multipart_form_data, replace post_data = content_data with post_data = strdup(content_data) when there are no non-file fields.
  • Add an allocation failure log for the strdup call and document the ownership rationale inline.

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

snayak002c
snayak002c previously approved these changes Jul 13, 2026
GoutamD2905
GoutamD2905 previously approved these changes Jul 14, 2026
Copilot AI review requested due to automatic review settings July 14, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread source/jst_post.c Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@pavankumar464
pavankumar464 dismissed stale reviews from snayak002c and GoutamD2905 via 923abe7 July 14, 2026 12:47
Copilot AI review requested due to automatic review settings July 14, 2026 12:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread source/jst_post.c Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread source/jst_post.c
Copilot AI review requested due to automatic review settings July 14, 2026 14:35
@pavankumar464 pavankumar464 changed the title RDKB-64641 Fix double-free in multipart POST fallback path RDKB-64641 sets post_data = NULL to keep getPost() unset for file-only multipart bodies Jul 14, 2026
@pavankumar464
pavankumar464 merged commit fcbbb7e into develop Jul 14, 2026
9 of 10 checks passed
@pavankumar464
pavankumar464 deleted the bug/RDKB-64641 branch July 14, 2026 14:38
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants