Skip to content

RDKB-64347: Fixing coverity issues#1106

Open
vanshika-singhal24 wants to merge 2 commits intordkcentral:developfrom
vanshika-singhal24:RDKB-4A
Open

RDKB-64347: Fixing coverity issues#1106
vanshika-singhal24 wants to merge 2 commits intordkcentral:developfrom
vanshika-singhal24:RDKB-4A

Conversation

@vanshika-singhal24
Copy link
Copy Markdown
Contributor

Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
Risks: Low
Priority: P1
Signed-off-by: vanshika_lnu@comcast.com

@vanshika-singhal24 vanshika-singhal24 requested a review from a team as a code owner May 4, 2026 11:30
@navyasher navyasher requested a review from Copilot May 4, 2026 12:57
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 addresses low-priority Coverity findings by adding defensive bounds/overflow checks in packet decoding, file packaging, and QM request parsing.

Changes:

  • Add radiotap header length validation before accessing the 802.11 frame in PCAP decoding.
  • Add file size and total package size cap/overflow checks while packing files.
  • Add request topic/data size bounds checks when reading QM requests from a socket.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
source/sampleapps/webconfig_consumer_apis.c Adds bounds checks to prevent out-of-range access when parsing radiotap + 802.11 frames from captured packets.
source/dml/tr_181/sbapi/pack_file.c Adds validation of per-file size and total package size to prevent oversized allocations/overflows during packing.
lib/qm/qm_conn.c Adds bounds checks for topic_len and data_size to keep reads within QM_COMPACT_SEND_SIZE.

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

Comment thread source/dml/tr_181/sbapi/pack_file.c Outdated
@vanshika-singhal24 vanshika-singhal24 force-pushed the RDKB-4A branch 2 times, most recently from ebea188 to 98c1f31 Compare May 4, 2026 13:10
Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
Risks: Low
Priority: P1
Signed-off-by: vanshika_lnu@comcast.com
}

if (buf.st_size < 0 || buf.st_size > PACK_MAX_SIZE_BYTES) {
fprintf(stderr, "%s: invalid file size %jd\n", __FUNCTION__, (intmax_t)buf.st_size);
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.

validate PACK_MAX_SIZE_BYTES value

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.

3 participants