select/selOps.c: CmdFindNetProc() Call to function with fewer arguments than declared parameters

The 'isvalid' pointer argument to CmdFindNetProc() is for an optional return value, so must be
NULL when feature is not used.

Copilot Autofix rejected: ttype = CmdFindNetProc(lab1, use, &rect, FALSE, additionalArg);

commands/CmdFI.c
cfb81101 (2022-03-30 13:02:12 -0400 1584)     bool *isvalid;

commit f89d52dbcc (tag: 8.3.253)
Date:   Thu Jan 6 13:29:43 2022 -0500

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/25
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent fff3be2f29
commit d297b99953
1 changed files with 1 additions and 1 deletions

View File

@ -942,7 +942,7 @@ SelectShort(char *lab1, char *lab2)
/* Make sure the selection is clear before starting */
SelectClear();
ttype = CmdFindNetProc(lab1, use, &rect, FALSE);
ttype = CmdFindNetProc(lab1, use, &rect, FALSE, NULL);
if (ttype == TT_SPACE) return NULL;
bzero(&scx, sizeof(SearchContext));