Skip to content

test-devpilot: Fix Coverity defects (1 file)#451

Open
rdkdevpilot wants to merge 1 commit into
developfrom
topic/test-devpilot
Open

test-devpilot: Fix Coverity defects (1 file)#451
rdkdevpilot wants to merge 1 commit into
developfrom
topic/test-devpilot

Conversation

@rdkdevpilot

Copy link
Copy Markdown

Automated Fix for Coverity Defects

Triggered by: Sandeep Nair2

Fixed Files

File Line(s) CIDs Checker Types Description
sampleapps/provider/rbusTableProvider.c L163 39973 BUFFER_SIZE Buffer not null terminated

Fix Summaries

sampleapps/provider/rbusTableProvider.c

The fix correctly addresses the BUFFER_SIZE 'buffer not null terminated' defect in tableAddRowHandler1 by reducing the strncpy count to MAX_LENGTH-1 and explicitly null-terminating the buffer. The fix is minimal, preserves existing logic, and matches the file's coding style. No new defects are introduced.

Defect ID: f48744a6-e82f-4945-ae1b-adf9d82c9008

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 pull request applies an automated Coverity fix in the RBUS sample table provider to ensure alias buffers are always NUL-terminated when copying an incoming alias string.

Changes:

  • Update tableAddRowHandler1 to copy at most MAX_LENGTH - 1 bytes into t1->alias and explicitly set the final byte to '\0' to guarantee termination.
  • Minor line-number/format shift at the end of the file due to the added block.

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants