magic/resis
Darryl L. Miles e88dcba1c5 CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks
Guided by CodeQL static code analyser.

FileMayNotBeClosed.ql
FileMayNeverBeClosed.ql

The trick with "if(fp != stdout)" is problematic (to analyser) as
technically 'stdout' can be a global pointer that COULD be modified any
time, so it might have changed between the fopen() and fclose() calls so
the close MAY NEVER occurs (which is problem the analyzer can see).

So local state is maintained as a bool which will also clarify to the
compiler see the intention without concern for external stdout
modification.

Some items appear to be out and out leaks when certain commands are use.
2025-02-22 21:02:49 -05:00
..
Makefile Corrected CalmaRead to remove a syntax error that managed to end up in 2021-06-06 21:44:52 -04:00
ResBasic.c Updated the revision number to go along with the merge of pull 2024-10-01 12:56:31 -04:00
ResChecks.c Additional changes, almost all stylistic, to make the resis/ section 2021-05-26 22:34:36 -04:00
ResDebug.c gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
ResFract.c Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
ResJunct.c Applied patch from Darryl Miles that prevents a segfault on an 2024-12-26 16:39:23 -05:00
ResMain.c Applied patch from Darryl Miles that prevents a segfault on an 2024-12-26 16:39:23 -05:00
ResMakeRes.c 12 x warning: suggest parentheses around '&&' within '||' 2024-10-09 21:12:55 -04:00
ResMerge.c resis.h: create RESTRUE to replace use of TRUE macro ((bool)1) 2025-01-07 14:02:07 -05:00
ResPrint.c Added a fallback method for "extresist" whenever a device terminal 2025-01-15 10:38:10 -05:00
ResReadSim.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
ResRex.c Added a fallback method for "extresist" whenever a device terminal 2025-01-15 10:38:10 -05:00
ResSimple.c 12 x warning: suggest parentheses around '&&' within '||' 2024-10-09 21:12:55 -04:00
ResUtils.c Committing a patch to prevent segfaulting during "extresist" when 2024-04-16 20:51:52 -04:00
ResWrite.c Additional changes, almost all stylistic, to make the resis/ section 2021-05-26 22:34:36 -04:00
resis.h Added a fallback method for "extresist" whenever a device terminal 2025-01-15 10:38:10 -05:00