Skip to content

RDKEMW-23008: Fix remaining coverity issues - #222

Open
trupthi1403 wants to merge 1 commit into
developfrom
topic/RDKEMW-23008
Open

RDKEMW-23008: Fix remaining coverity issues#222
trupthi1403 wants to merge 1 commit into
developfrom
topic/RDKEMW-23008

Conversation

@trupthi1403

@trupthi1403 trupthi1403 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Reason for change: Added fix for use-after-free issues
Test procedure: As in ticket
Risks: Medium

Copilot AI review requested due to automatic review settings August 6, 2026 07:29
@trupthi1403
trupthi1403 requested a review from a team as a code owner August 6, 2026 07:29

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

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 DrmSessionManager local 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.

Comment thread drm/DrmSessionManager.cpp Outdated
Comment thread externals/PlayerExternalsInterfaceBase.h Outdated
Reason for change: Added fix for use-after-free and copy instead of move
issues
Test procedure: As in ticket
Risks: Medium
Copilot AI review requested due to automatic review settings August 6, 2026 09:06

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 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants