Skip to content

RDKEMW-21075 : BtrCore_BTGetPairedDeviceInfo crash - #81

Open
PreethiALPI wants to merge 1 commit into
support/8.4.4.0from
RDKEMW-21075_108
Open

RDKEMW-21075 : BtrCore_BTGetPairedDeviceInfo crash#81
PreethiALPI wants to merge 1 commit into
support/8.4.4.0from
RDKEMW-21075_108

Conversation

@PreethiALPI

Copy link
Copy Markdown

Reason for change: Crash
Test Procedure: DEEPSLEEP/Reboot
Risks: Medium
Priority: P1

Reason for change: Crash
Test Procedure: DEEPSLEEP/Reboot
Risks: Medium
Priority: P1

Signed-off-by: ppalan289 <preethi_palanisamy@comcast.com>
@PreethiALPI
PreethiALPI requested a review from a team as a code owner July 21, 2026 13:41
Copilot AI review requested due to automatic review settings July 21, 2026 13:41

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 hardens BtrCore_BTGetPairedDeviceInfo() against crash conditions seen across deepsleep/reboot by adding defensive validation and safer D-Bus message handling when querying BlueZ managed objects and device properties.

Changes:

  • Added argument/handle validation (including pDBusConn) before issuing D-Bus calls.
  • Fixed boolean property extraction to use dbus_bool_t and added bounds/empty-path guards when collecting paired device paths.
  • Improved D-Bus message lifecycle safety (NULL checks, append-args failure handling, and additional unrefs/NULLing).

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

Comment on lines +4701 to +4705
if (!apstBtIfceHdl || !apBtAdapter || !pPairedDeviceInfo ||
!pstlhBtIfce || !pstlhBtIfce->pDBusConn) {
BTRCORELOG_ERROR ("NULL check failed.\n");
return -1;
}
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

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.

4 participants