extract/ExtBasic.c: Incorrect return-value check for a 'scanf'-like function
Fix code scanning alert no. 140: Incorrect return-value check for a 'scanf'-like function (#23) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
c16c770d7a
commit
0619cf4291
|
|
@ -405,7 +405,7 @@ extBasic(def, outFile)
|
|||
if (propfound)
|
||||
{
|
||||
token = strtok(NULL, " ");
|
||||
if ((token == NULL) || !sscanf(token, "%d", &urx))
|
||||
if ((token == NULL) || (sscanf(token, "%d", &urx) != 1))
|
||||
propfound = FALSE;
|
||||
else
|
||||
urx *= ExtCurStyle->exts_unitsPerLambda;
|
||||
|
|
@ -414,7 +414,7 @@ extBasic(def, outFile)
|
|||
if (propfound)
|
||||
{
|
||||
token = strtok(NULL, " ");
|
||||
if ((token == NULL) || !sscanf(token, "%d", &ury))
|
||||
if ((token == NULL) || (sscanf(token, "%d", &ury) != 1))
|
||||
propfound = FALSE;
|
||||
else
|
||||
ury *= ExtCurStyle->exts_unitsPerLambda;
|
||||
|
|
|
|||
Loading…
Reference in New Issue