database/DBtech.c: Incorrect return-value check for a 'scanf'-like function
Fix code scanning alert no. 135: Incorrect return-value check for a 'scanf'-like function (#12) * Create codeql.yml * Fix code scanning alert no. 135: 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
2a00ab7eb8
commit
886a0212e8
|
|
@ -223,7 +223,7 @@ DBTechSetVersion(sectionName, argc, argv)
|
|||
major = minor = rev = 0;
|
||||
rmajor = rminor = rrev = 0;
|
||||
|
||||
if (sscanf(vstring, "%d.%d.%d", &rmajor, &rminor, &rrev) == 0)
|
||||
if (sscanf(vstring, "%d.%d.%d", &rmajor, &rminor, &rrev) != 3)
|
||||
{
|
||||
TechError("Badly formed magic version string, should be major.minor.rev\n");
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue