Skip to content

CMFSUPPORT-3609 TEST. DO NOT MERGE#332

Closed
scthunderbolt wants to merge 3 commits intomasterfrom
feature/test-workflow
Closed

CMFSUPPORT-3609 TEST. DO NOT MERGE#332
scthunderbolt wants to merge 3 commits intomasterfrom
feature/test-workflow

Conversation

@scthunderbolt
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 16:39
Copy link
Copy Markdown

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 modifies the error logging in toHexString() within the device info CLI/sample code.

Changes:

  • Updates the printf call in the buffer-too-small branch of toHexString().

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


} else {
printf("ERROR: bufLength %d is too small for %d chars\n", *bufLength, totalLength);
printf("ERROR: bufLength %d is too small for %d chars\n", totalLength);
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The printf format string expects two integer arguments ("%d" twice), but only one argument (totalLength) is provided. This is undefined behavior and will likely print garbage/crash. Pass both *bufLength and totalLength (and consider using "%u"/casting since these are uint32_t) to match the format string.

Suggested change
printf("ERROR: bufLength %d is too small for %d chars\n", totalLength);
printf("ERROR: bufLength %u is too small for %u chars\n", *bufLength, totalLength);

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

2 participants