mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
graphics/grCMap.c: Incorrect return-value check for a 'scanf'-like function
Fix code scanning alert no. 150: Incorrect return-value check for a 'scanf'-like function (#8) * Create codeql.yml * Fix code scanning alert no. 150: 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> * Update grCMap.c * AI suggested '< 1', DLM edited to '<= 0' easier for a human to reason about ? --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
committed by
Tim Edwards
co-authored by
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent
39e76f3f31
commit
4ca98dc31b
+1
-1
@@ -156,7 +156,7 @@ char *libPath; /* a library search path */
|
||||
while (fgets(inputLine, 128, f) != NULL)
|
||||
{
|
||||
argc = sscanf(inputLine, "%*d %*d %*d %d", &newmax);
|
||||
if (argc == 0)
|
||||
if (argc <= 0)
|
||||
{
|
||||
/* Allow comment lines */
|
||||
if (*inputLine == '#') continue;
|
||||
|
||||
Reference in New Issue
Block a user