Skip to content

Update mfrMgr.c#77

Open
agampa263 wants to merge 1 commit intodevelopfrom
test/coverity
Open

Update mfrMgr.c#77
agampa263 wants to merge 1 commit intodevelopfrom
test/coverity

Conversation

@agampa263
Copy link
Copy Markdown
Contributor

No description provided.

@agampa263 agampa263 requested a review from a team as a code owner June 19, 2025 08:39
@agampa263 agampa263 requested a review from a team June 19, 2025 08:39
Comment thread mfr/mfrMgr.c
strncpy(param.cbData, notifyStruct.cbData, MAX_BUF);
param.cbData[MAX_BUF-1] = '\0';
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.cbData, param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
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 - Invalid type in argument to printf format specifier

Argument "param.status.error_string" to format specifier "%d" was expected to have type "int" but has type "char *".

Medium Impact, CWE-686
PRINTF_ARGS

Comment thread mfr/mfrMgr.c
strncpy(param.cbData, notifyStruct.cbData, MAX_BUF);
param.cbData[MAX_BUF-1] = '\0';
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.cbData, param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
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

Comment thread mfr/mfrMgr.c
strncpy(param.cbData, notifyStruct.cbData, MAX_BUF);
param.cbData[MAX_BUF-1] = '\0';
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.cbData, param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
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

Comment thread mfr/mfrMgr.c
strncpy(param.cbData, notifyStruct.cbData, MAX_BUF);
param.cbData[MAX_BUF-1] = '\0';
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.cbData, param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
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 - Invalid type in argument to printf format specifier

Argument "param.status.progress" to format specifier "%s" was expected to have type "char *" but has type "enum _mfrUpgradeProgress_t".

Medium Impact, CWE-686
PRINTF_ARGS

Comment thread mfr/mfrMgr.c
strncpy(param.cbData, notifyStruct.cbData, MAX_BUF);
param.cbData[MAX_BUF-1] = '\0';
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.cbData, param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
LOG("In writeImage callback: cbData=%s, progress=%d, error = %d, error_str=%s, percentage = %d\n", param.status.progress, param.status.error, param.status.error_string, param.status.percentage/100);
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 - Invalid type in argument to printf format specifier

Argument "param.status.percentage / 100" to format specifier "%s" was expected to have type "char *" but has type "int".

Medium Impact, CWE-686
PRINTF_ARGS

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.

2 participants