cmwind/CMWcmmnds.c: Incorrect return-value check for a 'scanf'-like function
Fix code scanning alert no. 134: Incorrect return-value check for a 'scanf'-like function (#13) * Create codeql.yml * Fix code scanning alert no. 134: Incorrect return-value check for a 'scanf'-like function Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
886a0212e8
commit
c89455782b
|
|
@ -372,7 +372,7 @@ cmwColor(w, cmd)
|
|||
}
|
||||
else if (cmd->tx_argc == 2)
|
||||
{
|
||||
if (sscanf(cmd->tx_argv[1], "%i", &color) == 0)
|
||||
if (sscanf(cmd->tx_argv[1], "%i", &color) != 1)
|
||||
{
|
||||
/* Invalid color---allow keywords "next" and "last" */
|
||||
crec = (CMWclientRec *) w->w_clientData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue