Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/deviceinfo/device_info/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*bufLength = length;

} 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);

Check warning

Code scanning / Coverity

Printf arg count mismatch Warning

PW.TOO_FEW_PRINTF_ARGS: the format string requires additional arguments

Check warning

Code scanning / Coverity

Missing argument to printf format specifier Warning

PRINTF_ARGS: No argument for format specifier "%d".
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

printf format string expects two integer arguments (%d ... %d) but only one argument (totalLength) is provided here. This is undefined behavior and will often crash or print garbage. Pass both values (e.g., current *bufLength and required totalLength) or adjust the format string to match the arguments; also consider using an unsigned/PRIu32 format since these are uint32_t.

Copilot uses AI. Check for mistakes.
*bufLength = 0;
}
}
Expand Down
Loading