less-685-1.fc44
List of Findings
Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/less.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
Error: SHELLCHECK_WARNING (CWE-477): [#def2]
/usr/bin/lesspipe.sh:125:19: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Error: COMPILER_WARNING (CWE-252): [#def3]
less-685/ch.c: scope_hint: In function ‘ch_get’
less-685/ch.c:311:33: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def4]
less-685/ch.c: scope_hint: In function ‘sync_logfile’
less-685/ch.c:448:33: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-416): [#def5]
less-685/ch.c:809:17: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*thisfile.buflist.next’
less-685/ch.c:806:16: branch_true: following ‘true’ branch...
less-685/ch.c:809:17: branch_true: ...to here
less-685/ch.c:810:17: release_memory: freed here
less-685/ch.c:806:16: branch_true: following ‘true’ branch...
less-685/ch.c:809:17: branch_true: ...to here
less-685/ch.c:809:17: danger: use after ‘free’ of ‘*thisfile.buflist.next’; freed at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
Error: COMPILER_WARNING (CWE-457): [#def6]
less-685/edit.c:611:9: warning[-Wmaybe-uninitialized]: ‘alt_filename’ may be used uninitialized
less-685/edit.c:442:15: note: ‘alt_filename’ was declared here
Error: COMPILER_WARNING (CWE-457): [#def7]
less-685/edit.c: scope_hint: In function ‘edit_ifile’
less-685/edit.c:615:9: warning[-Wmaybe-uninitialized]: ‘chflags’ may be used uninitialized
less-685/edit.c:439:13: note: ‘chflags’ was declared here
Error: COMPILER_WARNING (CWE-457): [#def8]
less-685/edit.c:629:21: warning[-Wmaybe-uninitialized]: ‘open_filename’ may be used uninitialized
less-685/edit.c:441:24: note: ‘open_filename’ was declared here
Error: COMPILER_WARNING (CWE-457): [#def9]
less-685/edit.c:665:21: warning[-Wmaybe-uninitialized]: ‘filename’ may be used uninitialized
less-685/edit.c:440:24: note: ‘filename’ was declared here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
less-685/edit.c:957:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
less-685/edit.c:939:12: branch_false: following ‘false’ branch...
less-685/edit.c:948:18: branch_false: ...to here
less-685/edit.c:948:18: acquire_resource: opened here
less-685/edit.c:949:12: branch_true: following ‘true’ branch...
less-685/edit.c:950:17: branch_true: ...to here
less-685/edit.c:957:21: danger: ‘open(filename, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
less-685/lesskey.c:356:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:338:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:340:20: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_resource: opened here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:356:9: danger: ‘fopen(outfile, "wb")’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
less-685/lesskey.c:356:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:338:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:340:20: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_memory: allocated here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:356:9: danger: ‘fopen(outfile, "wb")’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
less-685/lesskey.c:360:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_resource: opened here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:358:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:358:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:359:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:359:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:360:9: danger: ‘fopen(outfile, "wb")’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
less-685/lesskey.c:360:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_memory: allocated here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:358:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:358:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:359:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:359:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:360:9: danger: ‘fopen(outfile, "wb")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
less-685/lesskey.c:365:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_resource: opened here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:358:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:358:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:359:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:359:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:363:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:363:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:364:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:364:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:365:9: danger: ‘fopen(outfile, "wb")’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
less-685/lesskey.c:365:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(outfile, "wb")’
less-685/lesskey.c:292:5: enter_function: entry to ‘main’
less-685/lesskey.c:322:9: call_function: calling ‘parse_args’ from ‘main’
less-685/lesskey.c:322:9: return_function: returning to ‘main’ from ‘parse_args’
less-685/lesskey.c:324:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:330:9: branch_false: ...to here
less-685/lesskey.c:340:20: acquire_memory: allocated here
less-685/lesskey.c:340:12: branch_false: following ‘false’ branch...
less-685/lesskey.c:351:9: branch_false: ...to here
less-685/lesskey.c:351:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:351:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:354:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:354:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:355:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:355:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:358:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:358:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:359:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:359:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:363:9: call_function: calling ‘fputbytes’ from ‘main’
less-685/lesskey.c:363:9: return_function: returning to ‘main’ from ‘fputbytes’
less-685/lesskey.c:364:9: call_function: calling ‘fputint’ from ‘main’
less-685/lesskey.c:364:9: return_function: returning to ‘main’ from ‘fputint’
less-685/lesskey.c:365:9: danger: ‘fopen(outfile, "wb")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
less-685/lesskey_parse.c:561:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eq’
less-685/lesskey_parse.c:629:5: enter_function: entry to ‘parse_lesskey’
less-685/lesskey_parse.c:634:24: branch_false: following ‘false’ branch (when ‘infile’ is NULL)...
less-685/lesskey_parse.c:634:60: branch_false: ...to here
less-685/lesskey_parse.c:635:12: branch_false: following ‘false’ branch...
less-685/lesskey_parse.c:638:9: branch_false: ...to here
less-685/lesskey_parse.c:647:12: branch_true: following ‘true’ branch (when the strings are equal)...
less-685/lesskey_parse.c:648:17: branch_true: ...to here
less-685/lesskey_parse.c:658:12: branch_true: following ‘true’ branch (when ‘desc’ is non-NULL)...
branch_true: ...to here
less-685/lesskey_parse.c:660:24: branch_true: following ‘true’ branch...
less-685/lesskey_parse.c:662:25: branch_true: ...to here
less-685/lesskey_parse.c:663:25: call_function: calling ‘parse_line’ from ‘parse_lesskey’
Error: CPPCHECK_WARNING (CWE-457): [#def18]
less-685/line.c:1932: warning[uninitvar]: Uninitialized variable: pos
Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
less-685/linenum.c:197:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
less-685/linenum.c:477:13: enter_function: entry to ‘scan_eof’
less-685/linenum.c:483:12: branch_false: following ‘false’ branch...
less-685/linenum.c:489:9: call_function: inlined call to ‘start_delayed_msg’ from ‘scan_eof’
less-685/linenum.c:491:16: branch_true: following ‘true’ branch (when ‘pos != -1’)...
less-685/linenum.c:494:22: branch_true: ...to here
less-685/linenum.c:494:20: branch_true: following ‘true’ branch...
less-685/linenum.c:495:25: branch_true: ...to here
less-685/linenum.c:495:25: call_function: calling ‘add_lnum’ from ‘scan_eof’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
less-685/lsystem.c:114:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:114:9: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
less-685/lsystem.c:116:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:116:13: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING: [#def22]
less-685/lsystem.c:118:17: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:116:12: branch_true: following ‘true’ branch...
less-685/lsystem.c:118:17: branch_true: ...to here
less-685/lsystem.c:118:17: danger: ‘inp’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: COMPILER_WARNING (CWE-252): [#def23]
less-685/lsystem.c: scope_hint: In function ‘lsystem’
less-685/lsystem.c:118:17: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
less-685/lsystem.c:129:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:129:22: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
less-685/lsystem.c:132:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:129:12: branch_true: following ‘true’ branch...
less-685/lsystem.c:131:20: branch_true: following ‘true’ branch...
less-685/lsystem.c:132:29: branch_true: ...to here
less-685/lsystem.c:132:29: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
less-685/lsystem.c:135:40: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:129:12: branch_true: following ‘true’ branch...
less-685/lsystem.c:131:20: branch_false: following ‘false’ branch...
less-685/lsystem.c:135:40: branch_false: ...to here
less-685/lsystem.c:135:40: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def27]
less-685/lsystem.c:139:46: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:129:12: branch_true: following ‘true’ branch...
less-685/lsystem.c:131:20: branch_false: following ‘false’ branch...
less-685/lsystem.c:135:40: branch_false: ...to here
less-685/lsystem.c:136:28: branch_true: following ‘true’ branch...
less-685/lsystem.c:138:46: branch_true: ...to here
less-685/lsystem.c:139:46: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def28]
less-685/lsystem.c:140:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:129:12: branch_true: following ‘true’ branch...
less-685/lsystem.c:131:20: branch_false: following ‘false’ branch...
less-685/lsystem.c:135:40: branch_false: ...to here
less-685/lsystem.c:136:28: branch_true: following ‘true’ branch...
less-685/lsystem.c:138:46: branch_true: ...to here
less-685/lsystem.c:140:33: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
less-685/lsystem.c:148:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:147:20: branch_true: following ‘true’ branch...
less-685/lsystem.c:148:29: branch_true: ...to here
less-685/lsystem.c:148:29: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
less-685/lsystem.c:150:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:147:20: branch_false: following ‘false’ branch...
less-685/lsystem.c:150:29: branch_false: ...to here
less-685/lsystem.c:150:29: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
less-685/lsystem.c:152:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:152:9: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
Error: COMPILER_WARNING (CWE-252): [#def32]
less-685/lsystem.c:152:9: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-1341): [#def33]
less-685/lsystem.c:176:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘0’
less-685/lsystem.c:114:9: release_resource: first ‘close’ here
less-685/lsystem.c:176:9: danger: second ‘close’ here; first ‘close’ was at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
less-685/lsystem.c:176:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:176:9: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING: [#def35]
less-685/lsystem.c:177:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:177:9: danger: ‘inp’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
Error: COMPILER_WARNING (CWE-252): [#def36]
less-685/lsystem.c:177:9: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
less-685/lsystem.c:178:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘inp’
less-685/lsystem.c:113:15: acquire_resource: opened here
less-685/lsystem.c:178:9: danger: ‘inp’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
less-685/lsystem.c:303:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:303:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
less-685/lsystem.c:304:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:304:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
less-685/lsystem.c:305:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:305:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
less-685/lsystem.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:306:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
less-685/lsystem.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:308:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
less-685/lsystem.c:309:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:309:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
less-685/lsystem.c:310:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:310:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
less-685/lsystem.c:311:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:311:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
less-685/lsystem.c:325:21: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:320:16: branch_true: following ‘true’ branch (when ‘epos == -1’)...
less-685/lsystem.c:325:21: branch_true: ...to here
less-685/lsystem.c:325:21: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
less-685/lsystem.c:337:21: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:335:16: branch_true: following ‘true’ branch...
less-685/lsystem.c:337:21: branch_true: ...to here
less-685/lsystem.c:337:21: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
less-685/lsystem.c:347:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(cmd, "w")’
less-685/lsystem.c:292:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:298:18: branch_false: ...to here
less-685/lsystem.c:298:18: acquire_memory: allocated here
less-685/lsystem.c:298:12: branch_false: following ‘false’ branch...
less-685/lsystem.c:303:9: branch_false: ...to here
less-685/lsystem.c:347:9: danger: ‘popen(cmd, "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-909): [#def49]
less-685/position.c:127: error[uninitStructMember]: Uninitialized struct member: scrpos.ln
Error: GCC_ANALYZER_WARNING (CWE-416): [#def50]
less-685/tags.c:102:17: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘tp’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
Error: GCC_ANALYZER_WARNING (CWE-415): [#def51]
less-685/tags.c:103:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*tp.tag_file’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
Error: GCC_ANALYZER_WARNING (CWE-415): [#def52]
less-685/tags.c:104:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*tp.tag_pattern’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
less-685/tags.c:118:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_false: following ‘false’ branch...
less-685/tags.c:356:22: branch_false: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
less-685/tags.c:118:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_false: following ‘false’ branch...
less-685/tags.c:356:22: branch_false: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
less-685/tags.c:119:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_false: following ‘false’ branch...
less-685/tags.c:356:22: branch_false: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
less-685/tags.c:119:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_false: following ‘false’ branch...
less-685/tags.c:356:22: branch_false: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
less-685/tags.c:127:44: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_true: following ‘true’ branch...
less-685/tags.c:334:40: branch_true: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
less-685/tags.c:127:44: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_true: following ‘true’ branch...
less-685/tags.c:334:40: branch_true: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
less-685/tags.c:153:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(tags, 0)’
less-685/tags.c:166:13: enter_function: entry to ‘findtag’
less-685/tags.c:168:20: call_function: calling ‘gettagtype’ from ‘findtag’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
less-685/tags.c:302:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:302:21: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
less-685/tags.c:302:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:302:21: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
less-685/tags.c:315:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:315:21: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
less-685/tags.c:315:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:315:21: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
less-685/tags.c:324:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_resource: opened here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:324:30: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was opened at [(2)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
less-685/tags.c:324:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(shell_unquote(tags), "r")’
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:269:13: acquire_memory: allocated here
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:324:30: danger: ‘fopen(shell_unquote(tags), "r")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-131): [#def66]
less-685/tags.c:357:17: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
less-685/tags.c:253:24: enter_function: entry to ‘findctag’
less-685/tags.c:271:12: branch_false: following ‘false’ branch...
less-685/tags.c:274:9: branch_false: ...to here
less-685/tags.c:274:9: call_function: calling ‘cleantags’ from ‘findctag’
less-685/tags.c:274:9: return_function: returning to ‘findctag’ from ‘cleantags’
less-685/tags.c:281:16: branch_true: following ‘true’ branch...
less-685/tags.c:283:21: branch_true: ...to here
less-685/tags.c:325:20: branch_false: following ‘false’ branch...
less-685/tags.c:356:22: branch_false: ...to here
less-685/tags.c:356:22: call_function: calling ‘maketagent’ from ‘findctag’
less-685/tags.c:356:22: return_function: returning to ‘findctag’ from ‘maketagent’
less-685/tags.c:357:17: danger: assigned to ‘struct tag *’ here; ‘sizeof (struct tag)’ is ‘48’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
less-685/tags.c:491:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
less-685/tags.c:493:9: return_function: returning to ‘findgtag’ from ‘cleantags’
less-685/tags.c:500:12: branch_false: following ‘false’ branch (when ‘type != 1’)...
less-685/tags.c:513:38: branch_false: ...to here
less-685/tags.c:515:20: branch_false: following ‘false’ branch...
less-685/tags.c:518:17: branch_false: ...to here
branch_true: following ‘true’ branch...
less-685/tags.c:537:24: branch_true: ...to here
less-685/tags.c:544:22: acquire_memory: allocated here
less-685/tags.c:548:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
branch_true: ...to here
less-685/tags.c:590:20: branch_false: following ‘false’ branch...
less-685/tags.c:602:9: branch_false: ...to here
less-685/tags.c:491:24: danger: ‘fp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/14)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
less-685/tags.c:561:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
less-685/tags.c:493:9: return_function: returning to ‘findgtag’ from ‘cleantags’
less-685/tags.c:500:12: branch_false: following ‘false’ branch (when ‘type != 1’)...
less-685/tags.c:513:38: branch_false: ...to here
less-685/tags.c:515:20: branch_false: following ‘false’ branch...
less-685/tags.c:518:17: branch_false: ...to here
branch_true: following ‘true’ branch...
less-685/tags.c:537:24: branch_true: ...to here
less-685/tags.c:544:22: acquire_memory: allocated here
less-685/tags.c:548:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
branch_true: ...to here
less-685/tags.c:550:24: branch_true: following ‘true’ branch...
less-685/tags.c:557:29: branch_true: ...to here
less-685/tags.c:557:28: branch_true: following ‘true’ branch...
less-685/tags.c:560:37: branch_true: ...to here
less-685/tags.c:560:36: branch_true: following ‘true’ branch...
less-685/tags.c:561:41: branch_true: ...to here
less-685/tags.c:561:41: danger: ‘fp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/14)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
less-685/tags.c:572:45: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
less-685/tags.c:493:9: return_function: returning to ‘findgtag’ from ‘cleantags’
less-685/tags.c:500:12: branch_false: following ‘false’ branch (when ‘type != 1’)...
less-685/tags.c:513:38: branch_false: ...to here
less-685/tags.c:515:20: branch_false: following ‘false’ branch...
less-685/tags.c:518:17: branch_false: ...to here
branch_true: following ‘true’ branch...
less-685/tags.c:537:24: branch_true: ...to here
less-685/tags.c:544:22: acquire_memory: allocated here
less-685/tags.c:548:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
branch_true: ...to here
less-685/tags.c:550:24: branch_true: following ‘true’ branch...
less-685/tags.c:557:29: branch_true: ...to here
less-685/tags.c:557:28: branch_false: following ‘false’ branch...
less-685/tags.c:565:31: branch_false: ...to here
less-685/tags.c:572:45: danger: ‘fp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/14)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
less-685/tags.c:592:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
less-685/tags.c:484:24: enter_function: entry to ‘findgtag’
less-685/tags.c:490:12: branch_false: following ‘false’ branch...
less-685/tags.c:493:9: branch_false: ...to here
less-685/tags.c:493:9: call_function: calling ‘cleantags’ from ‘findgtag’
less-685/tags.c:493:9: return_function: returning to ‘findgtag’ from ‘cleantags’
less-685/tags.c:500:12: branch_false: following ‘false’ branch (when ‘type != 1’)...
less-685/tags.c:513:38: branch_false: ...to here
less-685/tags.c:515:20: branch_false: following ‘false’ branch...
less-685/tags.c:518:17: branch_false: ...to here
branch_true: following ‘true’ branch...
less-685/tags.c:537:24: branch_true: ...to here
less-685/tags.c:544:22: acquire_memory: allocated here
less-685/tags.c:548:12: branch_true: following ‘true’ branch (when ‘fp’ is non-NULL)...
branch_true: ...to here
less-685/tags.c:590:20: branch_true: following ‘true’ branch...
less-685/tags.c:592:29: branch_true: ...to here
less-685/tags.c:592:29: danger: ‘fp’ leaks here; was allocated at [(15)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/14)
Scan Properties
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-223.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | less-685-1.fc44 |
| store-results-to | /tmp/tmpr5l1su2n/less-685-1.fc44.tar.xz |
| time-created | 2025-10-28 19:00:34 |
| time-finished | 2025-10-28 19:01:59 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpr5l1su2n/less-685-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpr5l1su2n/less-685-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |