Skip to content

RDKB-67047: Apply null pointer safeguards in is_ValidIpAddressv6_port() - #135

Merged
snayak002c merged 1 commit into
developfrom
feature/RDKB-66923
Sep 25, 2026
Merged

snayak002c merged 1 commit into
developfrom
feature/RDKB-66923

Conversation

@sivaraj-comcast

Copy link
Copy Markdown
Contributor

Reason for change: Apply null pointer safeguards to validate if the host name doesn't contain proper "[" and "]" tags.
Test Procedure: Execute DML with invalid ipv6 format like missing "]" at end... e.g: " dmcli eRT setv Device.IPv6rd.InterfaceSetting.1.Alias string "[2001:0db8:85a3:0000:0000:8a2e:0370:7334" &" and make sure CcspPandMSsp process doesn't restart
Risks: Low
Priority: P1
Signed-off-by: Sivaraj_Sivalingam@comcast.com

Reason for change: Apply null pointer safeguards to validate if the host name doesn't contain proper "[" and "]" tags.
Test Procedure: Run " dmcli eRT setv Device.IPv6rd.InterfaceSetting.1.Alias string "[2001:0db8:85a3:0000:0000:8a2e:0370:7334" &" and make sure CcspPandMSsp process doesn't restart
Risks: Low
Priority: P1
Signed-off-by: Sivaraj_Sivalingam@comcast.com
Copilot AI lite review requested due to automatic review settings September 24, 2026 18:46
@sivaraj-comcast
sivaraj-comcast requested review from a team as code owners September 24, 2026 18:46

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.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds null-pointer and allocation safeguards for malformed bracketed IPv6 host/port strings, preventing crashes during validation.

Changes:

  • Handles allocation failures and cleanup.
  • Rejects missing IPv6 tokens or closing brackets.
  • Guards port-pointer access.
File Description
source/​util_api/​ansc/​AnscStringUtil/​ansc_string_util.c Adds defensive validation and cleanup in IPv6 address/port parsing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@snayak002c
snayak002c merged commit 29f64cc into develop Sep 25, 2026
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 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