mtools-4.0.45-1.fc42
List of Findings
Error: SHELLCHECK_WARNING (CWE-138): [#def1]
/usr/bin/tgz:41:20: error[SC2145]: Argument mixes string and array. Use * or separate argument.
Error: SHELLCHECK_WARNING (CWE-569): [#def2]
/usr/bin/tgz:56:6: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
Error: SHELLCHECK_WARNING (CWE-569): [#def3]
/usr/bin/tgz:64:9: warning[SC2221]: This pattern always overrides a later one on line 64.
Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/usr/bin/tgz:64:28: warning[SC2222]: This pattern never matches because of a previous pattern on line 64.
Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/bin/tgz:77:17: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c: scope_hint: In function ‘try’
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:65:19: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(asciiTries[i], testCp)’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c: scope_hint: In function ‘cp_open’
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:118:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(wcharCp, & dosCp)’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:126:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(&dosCp, wcharCp)’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:131:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(&dosCp, wcharCp)’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:139:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(wcharCp, & dosCp)’
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:20: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:138:15: note: in expansion of macro ‘New’
Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c: scope_hint: In function ‘safe_iconv’
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:190:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mangled’
Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
mtools-4.0.45-build/mtools-4.0.45/charsetConv.c:210:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mangled’
Error: CPPCHECK_WARNING (CWE-401): [#def13]
mtools-4.0.45-build/mtools-4.0.45/config.c:463: error[memleakOnRealloc]: Common realloc mistake: 'devices' nulled but not freed upon failure
Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
mtools-4.0.45-build/mtools-4.0.45/expand.c:33:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
mtools-4.0.45-build/mtools-4.0.45/expand.c: scope_hint: In function ‘safePopenOut’
mtools-4.0.45-build/mtools-4.0.45/expand.c:33:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
mtools-4.0.45-build/mtools-4.0.45/expand.c:43:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup(pipefd[1])’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
mtools-4.0.45-build/mtools-4.0.45/fat.c: scope_hint: In function ‘loadSector’
mtools-4.0.45-build/mtools-4.0.45/fat.c:186:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*This.sector_size * 64)’
mtools-4.0.45-build/mtools-4.0.45/sysincludes.h:136: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/fat.c:19: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/fat.c: scope_hint: In function ‘loadSector’
mtools-4.0.45-build/mtools-4.0.45/fat.c: scope_hint: In function ‘loadSector’
Error: CPPCHECK_WARNING (CWE-401): [#def18]
mtools-4.0.45-build/mtools-4.0.45/init.c:520: error[memleak]: Memory leak: This
Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
mtools-4.0.45-build/mtools-4.0.45/init.c: scope_hint: In function ‘getDrive’
mtools-4.0.45-build/mtools-4.0.45/init.c:610:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.45-build/mtools-4.0.45/init.c: scope_hint: In function ‘getDrive’
Error: CPPCHECK_WARNING (CWE-562): [#def20]
mtools-4.0.45-build/mtools-4.0.45/mainloop.c:255: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:220:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:220:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:226:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:226:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:227:47: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c:227:47: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.45-build/mtools-4.0.45/mbadblocks.c: scope_hint: In function ‘mbadblocks’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
mtools-4.0.45-build/mtools-4.0.45/mcopy.c: scope_hint: In function ‘unix_target_lookup’
mtools-4.0.45-build/mtools-4.0.45/mcopy.c:136:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*arg.unixTarget’ where non-null expected
mtools-4.0.45-build/mtools-4.0.45/sysincludes.h:183: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/mcopy.c:24: included_from: Included from here.
/usr/include/unistd.h:287:12: note: argument 1 of ‘access’ must be non-null
Error: GCC_ANALYZER_WARNING (CWE-688): [#def28]
mtools-4.0.45-build/mtools-4.0.45/mcopy.c:136:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘arg.unixTarget’ where non-null expected
/usr/include/unistd.h:287:12: note: argument 1 of ‘access’ must be non-null
Error: GCC_ANALYZER_WARNING (CWE-415): [#def29]
mtools-4.0.45-build/mtools-4.0.45/mdir.c: scope_hint: In function ‘leaveDirectory’
mtools-4.0.45-build/mtools-4.0.45/mdir.c:305:25: warning[-Wanalyzer-double-free]: double-‘free’ of ‘dynDirPath’
mtools-4.0.45-build/mtools-4.0.45/mdir.c: scope_hint: In function ‘leaveDirectory’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
mtools-4.0.45-build/mtools-4.0.45/mk_direntry.c:571:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argname’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
mtools-4.0.45-build/mtools-4.0.45/mk_direntry.c: scope_hint: In function ‘mt_mwrite_one’
mtools-4.0.45-build/mtools-4.0.45/mk_direntry.c:571:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘argname’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
mtools-4.0.45-build/mtools-4.0.45/mmount.c: scope_hint: In function ‘mmount’
mtools-4.0.45-build/mtools-4.0.45/mmount.c:71:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
mtools-4.0.45-build/mtools-4.0.45/mmount.c: scope_hint: In function ‘mmount’
mtools-4.0.45-build/mtools-4.0.45/mtools.h:39: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/mmount.c:27: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/mmount.c:54:9: note: in expansion of macro ‘FREE’
Error: COMPILER_WARNING: [#def33]
mtools-4.0.45-build/mtools-4.0.45/msdos.h:82:17: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
mtools-4.0.45-build/mtools-4.0.45/msdos.h: scope_hint: In function ‘mformat’
mtools-4.0.45-build/mtools-4.0.45/msdos.h:166:23: note: at offset [21, 65556] into destination object ‘jump’ of size 3
Error: COMPILER_WARNING: [#def34]
mtools-4.0.45-build/mtools-4.0.45/msdos.h:83:17: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
mtools-4.0.45-build/mtools-4.0.45/msdos.h: scope_hint: In function ‘mformat’
mtools-4.0.45-build/mtools-4.0.45/msdos.h:166:23: note: at offset [20, 65555] into destination object ‘jump’ of size 3
Error: COMPILER_WARNING (CWE-252): [#def35]
mtools-4.0.45-build/mtools-4.0.45/privileges.c: scope_hint: In function ‘Setuid’
mtools-4.0.45-build/mtools-4.0.45/privileges.c:98:17: warning[-Wunused-result]: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def36]
mtools-4.0.45-build/mtools-4.0.45/privileges.c:104:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def37]
mtools-4.0.45-build/mtools-4.0.45/privileges.c: scope_hint: In function ‘reclaim_privs’
mtools-4.0.45-build/mtools-4.0.45/privileges.c:114:9: warning[-Wunused-result]: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def38]
mtools-4.0.45-build/mtools-4.0.45/privileges.c: scope_hint: In function ‘drop_privs’
mtools-4.0.45-build/mtools-4.0.45/privileges.c:122:9: warning[-Wunused-result]: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def39]
mtools-4.0.45-build/mtools-4.0.45/privileges.c: scope_hint: In function ‘destroy_privs’
mtools-4.0.45-build/mtools-4.0.45/privileges.c:132:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def40]
mtools-4.0.45-build/mtools-4.0.45/privileges.c:133:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def41]
mtools-4.0.45-build/mtools-4.0.45/privileges.c:135:17: warning[-Wunused-result]: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def42]
mtools-4.0.45-build/mtools-4.0.45/privileges.c: scope_hint: In function ‘init_privs’
mtools-4.0.45-build/mtools-4.0.45/privileges.c:183:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
mtools-4.0.45-build/mtools-4.0.45/stream.h:58:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:140:31: note: in expansion of macro ‘PREADS’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:140:31: note: in expansion of macro ‘PREADS’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:140:31: note: in expansion of macro ‘PREADS’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
mtools-4.0.45-build/mtools-4.0.45/mtools.h:39: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/mcat.c:23: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/mcat.c: scope_hint: In function ‘mcat’
mtools-4.0.45-build/mtools-4.0.45/stream.h:61:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:132:37: note: in expansion of macro ‘PWRITES’
mtools-4.0.45-build/mtools-4.0.45/mcat.c: scope_hint: In function ‘mcat’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:132:37: note: in expansion of macro ‘PWRITES’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:132:37: note: in expansion of macro ‘PWRITES’
mtools-4.0.45-build/mtools-4.0.45/mcat.c:132:37: note: in expansion of macro ‘PWRITES’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def45]
mtools-4.0.45-build/mtools-4.0.45/swap.c: scope_hint: In function ‘swap_pwrite’
mtools-4.0.45-build/mtools-4.0.45/swap.c:58:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘swapping’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
Error: GCC_ANALYZER_WARNING (CWE-688): [#def46]
mtools-4.0.45-build/mtools-4.0.45/tty.c: scope_hint: In function ‘ask_confirmation’
mtools-4.0.45-build/mtools-4.0.45/tty.c:216:33: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
mtools-4.0.45-build/mtools-4.0.45/sysincludes.h:179: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/tty.c:18: included_from: Included from here.
/usr/include/stdio.h:575:12: note: argument 1 of ‘fgetc’ must be non-null
Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
mtools-4.0.45-build/mtools-4.0.45/unixdir.c: scope_hint: In function ‘OpenDir’
mtools-4.0.45-build/mtools-4.0.45/unixdir.c:154:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘This’
mtools-4.0.45-build/mtools-4.0.45/stream.h:27: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/unixdir.c:19: included_from: Included from here.
mtools-4.0.45-build/mtools-4.0.45/unixdir.c:152:16: note: in expansion of macro ‘New’
Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
mtools-4.0.45-build/mtools-4.0.45/vfat.c: scope_hint: In function ‘parse_vses’
mtools-4.0.45-build/mtools-4.0.45/vfat.c:420:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*v.sum’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
mtools-4.0.45-build/mtools-4.0.45/vfat.c: scope_hint: In function ‘lookupForInsert’
mtools-4.0.45-build/mtools-4.0.45/vfat.c:838:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
Scan Properties
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-117.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | mtools-4.0.45-1.fc42 |
store-results-to | /tmp/tmpfp2fft18/mtools-4.0.45-1.fc42.tar.xz |
time-created | 2024-11-13 02:07:24 |
time-finished | 2024-11-13 02:08:53 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpfp2fft18/mtools-4.0.45-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpfp2fft18/mtools-4.0.45-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |