RDKB-63310- Fix coverity issues#12
Merged
johnsonsebastiar merged 1 commit intordkcentral:mainfrom Mar 11, 2026
Merged
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RDKB-63310- Fix coverity issues