Skip to content

RDKEMW-14533 : DummyPR-forCovTest#67

Closed
PreethiLakshmi91 wants to merge 1 commit intodevelopfrom
CovBt
Closed

RDKEMW-14533 : DummyPR-forCovTest#67
PreethiLakshmi91 wants to merge 1 commit intodevelopfrom
CovBt

Conversation

@PreethiLakshmi91
Copy link
Copy Markdown

Reason for change: Inclusion of coverity for BT
Test Procedure: NA
Risks: Low
Priority: P2

Reason for change: Inclusion of coverity for BT
Test Procedure: NA
Risks: Low
Priority: P2

Signed-off-by: ppalan289 <preethi_palanisamy@comcast.com>
@PreethiLakshmi91 PreethiLakshmi91 requested a review from a team as a code owner April 1, 2026 15:26
Copilot AI review requested due to automatic review settings April 1, 2026 15:26
Copy link
Copy Markdown
Contributor

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 appears to be a “dummy” change intended to trigger/validate Coverity integration for the Bluetooth (BT) component, but it introduces a critical memory safety defect in a BT adapter status callback.

Changes:

  • Modified the memset size used to initialize a local stBTRCoreAdapter struct in btrCore_BTAdapterStatusUpdateCb.

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

Comment thread src/btrCore.c
}

memset(&lstAdapterInfo, 0, sizeof(stBTRCoreAdapter));
memset(&lstAdapterInfo, 0, 10*sizeof(stBTRCoreAdapter));
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

lstAdapterInfo is a single stBTRCoreAdapter stack variable, but this memset zeros 10 * sizeof(stBTRCoreAdapter) bytes, which will write past the end of the object and corrupt the stack. Use sizeof(lstAdapterInfo) (or sizeof(stBTRCoreAdapter)) for the size argument; multiplying by 10 is unsafe and incorrect here.

Suggested change
memset(&lstAdapterInfo, 0, 10*sizeof(stBTRCoreAdapter));
memset(&lstAdapterInfo, 0, sizeof(lstAdapterInfo));

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 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