From d297b99953822c7f8c5618a530c3fc464ebc06ba Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] 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 f89d52dbcc6f21eafff2479d94a44e944bd0b767 (tag: 8.3.253) Date: Thu Jan 6 13:29:43 2022 -0500 CodeQL: https://github.com/dlmiles/magic/security/code-scanning/25 --- select/selOps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select/selOps.c b/select/selOps.c index 3305b48f..1d1663c5 100644 --- a/select/selOps.c +++ b/select/selOps.c @@ -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));