Skip to content

RDKB-65508, RDKB-65530: Crash with cJSON_Delete as signature - #1236

Merged
mateuszCieslak-GL merged 1 commit into
rdkcentral:mainfrom
Raju-krish:main
Jul 13, 2026
Merged

RDKB-65508, RDKB-65530: Crash with cJSON_Delete as signature#1236
mateuszCieslak-GL merged 1 commit into
rdkcentral:mainfrom
Raju-krish:main

Conversation

@Raju-krish

Copy link
Copy Markdown
Contributor

Reason for change: Crash occurs because of accessing dangling pointer.
Test Procedure: Build should be successful, Crash shouldn't occur.
Risks: Low
Priority: P1

Copilot AI review requested due to automatic review settings June 29, 2026 10:52

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 crash caused by accessing freed cJSON nodes after schema parsing by avoiding reference-based merges when resolving $ref (the parsed root schema is deleted at the end of parsing, so referenced nodes can become dangling).

Changes:

  • Replace cJSON_AddItemReferenceToObject() with a deep copy (cJSON_Duplicate(..., 1)) when merging referenced schema nodes into a base object.

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

Comment thread source/platform/common/data_model/wifi_dml_json_parser.c
@mateuszCieslak-GL

mateuszCieslak-GL commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Hi, since this targets main branch, please trigger verification builds from gerrit with this change. Thanks!
Also, please address the copilot comment above ,

Copilot AI review requested due to automatic review settings July 10, 2026 06:43

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/platform/common/data_model/wifi_dml_json_parser.c
@mateuszCieslak-GL

Copy link
Copy Markdown
Contributor

please post gerrit change link here @Raju-krish

@Raju-krish

Copy link
Copy Markdown
Contributor Author

please post gerrit change link here @Raju-krish

@mateuszCieslak-GL Sure, Trigger verification build success: https://gerrit.teamccp.com/#/c/959647/

Reason for change: Crash occurs because of accessing dangling pointer.
Test Procedure: Build should be successful, Crash shouldn't occur.
Risks: Low
Priority: P1
Signed-off-by: Rajagopalaswamy M <[email protected]>

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/platform/common/data_model/wifi_dml_json_parser.c
@mateuszCieslak-GL
mateuszCieslak-GL merged commit af46309 into rdkcentral:main Jul 13, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 13, 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.

3 participants