RDKEMW-23008: Fix remaining coverity issues - #222
Open
trupthi1403 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets remaining Coverity findings by adjusting GStreamer property access patterns and session handling to mitigate reported use-after-free and copy/move issues in the middleware player interface.
Changes:
- Updated GStreamer decryptor property assignment to set multiple pointer properties in a single
g_object_set()call. - Consolidated decoder dimension reads into a single
g_object_get()call and adjusted logging pointer usage. - Modified
DrmSessionManagerlocal session handling (currently switching from copy to reference).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| vendor/SocInterface.cpp | Adjusts warning log when plugin scan yields default platform. |
| InterfacePlayerRDK.cpp | Updates decryptor property assignment to use g_object_set() with multiple properties. |
| externals/PlayerExternalsInterfaceBase.h | Consolidates video_height/video_width reads and updates log pointer reference. |
| drm/DrmSessionManager.cpp | Changes local session variable from copy to reference across several methods. |
Suppressed comments (4)
drm/DrmSessionManager.cpp:244
- Using a const reference does not create the “local copy” described in the comment and does not extend the session lifetime; ContentSecurityManagerSession is explicitly designed to be copied (shared ownership) to keep the session open while using its ID. Use a copy here.
const auto& localSession = mContentSecurityManagerSession; //Remove potential isSessionValid(), getSessionID() race by using a local copy
drm/DrmSessionManager.cpp:264
- Using a const reference does not create the “local copy” described in the comment and does not extend the session lifetime; ContentSecurityManagerSession is explicitly designed to be copied (shared ownership) to keep the session open while using its ID. Use a copy here.
const auto& localSession = mContentSecurityManagerSession; //Remove potential isSessionValid(), getSessionID() race by using a local copy
drm/DrmSessionManager.cpp:276
- Using a const reference does not create the “local copy” described in the comment and does not extend the session lifetime; ContentSecurityManagerSession is explicitly designed to be copied (shared ownership) to keep the session open while using its ID. Use a copy here.
const auto& localSession = mContentSecurityManagerSession; //Remove potential isSessionValid(), getSessionID() race by using a local copy
drm/DrmSessionManager.cpp:971
- Using a const reference does not create the “local copy” described in the comment and does not extend the session lifetime; ContentSecurityManagerSession is explicitly designed to be copied (shared ownership) to keep the session open while using its ID. Use a copy here.
const auto& localSession = mContentSecurityManagerSession; //Remove potential isSessionValid(), getSessionID() race by using a local copy
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reason for change: Added fix for use-after-free and copy instead of move issues Test procedure: As in ticket Risks: Medium
trupthi1403
force-pushed
the
topic/RDKEMW-23008
branch
from
August 6, 2026 09:06
2472cc7 to
baed18d
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reason for change: Added fix for use-after-free issues
Test procedure: As in ticket
Risks: Medium