extract/ExtTech.c: Incorrect return-value check for a 'scanf'-like function

Fix code scanning alert no. 136: Incorrect return-value check for a 'scanf'-like function (#11)

* Create codeql.yml

* Fix code scanning alert no. 136: 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:
Darryl Miles 2024-09-30 01:49:35 +01:00 committed by Tim Edwards
parent e66e3b32ad
commit 2a00ab7eb8
1 changed files with 1 additions and 1 deletions

View File

@ -2501,7 +2501,7 @@ ExtTechLine(sectionName, argc, argv)
equal = TRUE;
limitstr++;
}
if (sscanf(limitstr, "%lg", &dval) == 0)
if (sscanf(limitstr, "%lg", &dval) != 1)
{
TxError("Non-numeric limit \"%s\" for parameter \"%c%s\".\n",
limitstr, cond, argv[argc - 1]);