From d2ae7f78e83b75ae1112b542dbe3115c3a55b248 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] ext2sim/ext2sim.c: EFDone() Call to function with fewer arguments than declared parameters Passing NULL is valid in efFreeNodeList() to not perform callback.. extflat/EFdef.c: ^231a299 (2017-04-25 08:41:48 -0400 97) void 5e3c26c9 (2021-12-13 18:05:53 -0500 98) EFDone(func) 5e3c26c9 (2021-12-13 18:05:53 -0500 99) int (*func)(); commit 5e3c26c95afadfd07753bb8126fa6528afce5dd8 (tag: 8.3.241) Date: Mon Dec 13 18:05:53 2021 -0500 extflat/EFdef.c:97 void EFDone(int (*func)()); extflat/EFbuild.c:2180 void efFreeNodeList(EFNode *head, int (*func)()); CodeQL: https://github.com/dlmiles/magic/security/code-scanning/11 --- ext2sim/ext2sim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext2sim/ext2sim.c b/ext2sim/ext2sim.c index a4e87cbd..51861ec4 100644 --- a/ext2sim/ext2sim.c +++ b/ext2sim/ext2sim.c @@ -534,7 +534,7 @@ runexttosim: if (err_result == TRUE) { - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } @@ -548,7 +548,7 @@ runexttosim: if (w == (MagWindow *) NULL) { TxError("Point to a window or specify a cell name.\n"); - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } inName = ((CellUse *) w->w_surfaceID)->cu_def->cd_name; @@ -585,7 +585,7 @@ runexttosim: #else TxError("exttosim: Unable to open file %s for writing\n", simesOutName); #endif - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } if (!esNoAlias && (esAliasF = fopen(esAliasName, "w")) == NULL) @@ -598,7 +598,7 @@ runexttosim: #else TxError("exttosim: Unable to open file %s for writing\n", esAliasName); #endif - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } if (!esNoLabel && (esLabF = fopen(esLabelName, "w")) == NULL) @@ -617,7 +617,7 @@ runexttosim: /* Read the hierarchical description of the input circuit */ if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE, FALSE) == FALSE) { - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; }