Skip to content

RDKB-63310- Fix coverity issues#12

Merged
johnsonsebastiar merged 1 commit intordkcentral:mainfrom
biju-vi:coverity
Mar 11, 2026
Merged

RDKB-63310- Fix coverity issues#12
johnsonsebastiar merged 1 commit intordkcentral:mainfrom
biju-vi:coverity

Conversation

@biju-vi
Copy link
Copy Markdown
Contributor

@biju-vi biju-vi commented Mar 6, 2026

RDKB-63310- Fix coverity issues

Copilot AI review requested due to automatic review settings March 6, 2026 09:30
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

This PR targets Coverity findings in the InterDeviceManager component by tightening up string handling, initializing variables, and adding defensive NULL checks in a few code paths.

Changes:

  • Replace potentially unsafe string copies with bounded operations and explicit buffer clearing before strncpy.
  • Initialize previously uninitialized pointers/locals and add new NULL checks in message/rbus handlers.
  • Minor cleanup in main() argument parsing for -subsys.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
source/InterDeviceManager/inter_device_manager_main.c Adjusts subsystem parsing and removes some unused locals, but still leaves unused variables behind.
source/InterDeviceManager/Idm_utils.c Clears destination buffers before copying MAC/capabilities into the local device record.
source/InterDeviceManager/Idm_rbus.c Adds a NULL check for the RBUS property name in the set handler.
source/InterDeviceManager/Idm_msg_process.c Initializes locals, adds NULL checks, and adjusts strncpy sizing; contains remaining NULL-deref issues in modified regions.
source/InterDeviceManager/Idm_data.c Replaces AnscCopyString with bounded strncpy for PSM-derived strings and default ft_status initialization.
source/InterDeviceManager/Idm_call_back_apis.c Adds NULL validation for callback inputs before use.
source/InterDeviceManager/Idm_TCP_apis.c Initializes locals in file-transfer routine to satisfy static analysis.

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

Comment thread source/InterDeviceManager/inter_device_manager_main.c
Comment thread source/InterDeviceManager/Idm_msg_process.c
Comment thread source/InterDeviceManager/Idm_msg_process.c
Copilot AI review requested due to automatic review settings March 10, 2026 23:32
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


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

Comment thread source/InterDeviceManager/Idm_data.c
Comment thread source/InterDeviceManager/Idm_rbus.c
Comment thread source/InterDeviceManager/inter_device_manager_main.c
Comment thread source/InterDeviceManager/Idm_data.c
RDKB-63310 - Fix IDM coverity issue

RDKB-63310 - Fix IDM coverity issue

RDKB-63310 - Fix IDM coverity issue

RDKB-63310 - Fix IDM coverity issue

RDKB-63310 - Fix IDM coverity issue
Copy link
Copy Markdown

@johnsonsebastiar johnsonsebastiar left a comment

Choose a reason for hiding this comment

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

Changes look good.

@johnsonsebastiar johnsonsebastiar merged commit 2ee7887 into rdkcentral:main Mar 11, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 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