Skip to content

CMFSUPPORT-3609 TEST. DO NOT MERGE#324

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

CMFSUPPORT-3609 TEST. DO NOT MERGE#324
scthunderbolt wants to merge 3 commits into
masterfrom
feature/test-workflow

Conversation

@scthunderbolt
Copy link
Copy Markdown

DO NOT MERGE

Copilot AI review requested due to automatic review settings December 17, 2025 17:15
Comment thread Source/deviceinfo/device_info/main.c Fixed
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 an error message in the toHexString function by removing one of the printf arguments, introducing a critical bug. The PR is marked as a test change that should not be merged.

  • Modified error message printf statement to provide only one argument instead of two
  • The change creates undefined behavior in the error reporting code

💡 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 Dec 17, 2025

Choose a reason for hiding this comment

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

The printf statement now has only one format argument (%d) but only provides one value (totalLength), whereas the original error message format string has two %d placeholders. This means the second %d will print garbage/undefined values. The original version correctly provided both *bufLength and totalLength as arguments to match the two %d format specifiers in the error message.

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

Copilot uses AI. Check for mistakes.

} 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Coverity Issue - Printf arg count mismatch

the format string requires additional arguments

Medium Impact, CWE-685
PW.TOO_FEW_PRINTF_ARGS


} 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Coverity Issue - Missing argument to printf format specifier

No argument for format specifier "%d".

Medium Impact, CWE-685
PRINTF_ARGS

@scthunderbolt scthunderbolt deleted the feature/test-workflow branch December 17, 2025 17:42
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 17, 2025
@scthunderbolt scthunderbolt restored the feature/test-workflow branch March 26, 2026 10:45
@scthunderbolt scthunderbolt reopened this Mar 26, 2026
Copilot AI review requested due to automatic review settings March 26, 2026 12:25
@scthunderbolt scthunderbolt deleted the feature/test-workflow branch April 2, 2026 13:24
@scthunderbolt scthunderbolt added the invalid This doesn't seem right label Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants