mtools-4.0.48-1.fc43
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.48/charsetConv.c:85:19: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(asciiTries[i], testCp)’
mtools-4.0.48/charsetConv.c:83:18: branch_true: following ‘true’ branch (when ‘i != 4’)...
mtools-4.0.48/charsetConv.c:84:24: branch_true: ...to here
mtools-4.0.48/charsetConv.c:84:24: acquire_memory: allocated here
mtools-4.0.48/charsetConv.c:85:19: danger: ‘iconv_open(asciiTries[i], testCp)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
mtools-4.0.48/charsetConv.c:138:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(wcharCp, & dosCp)’
mtools-4.0.48/charsetConv.c:128:11: branch_false: following ‘false’ branch (when ‘codepage <= 9999’)...
mtools-4.0.48/charsetConv.c:133:12: branch_false: ...to here
mtools-4.0.48/charsetConv.c:133:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:136:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:137:16: acquire_memory: allocated here
mtools-4.0.48/charsetConv.c:138:11: danger: ‘iconv_open(wcharCp, & dosCp)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
mtools-4.0.48/charsetConv.c:146:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(&dosCp, wcharCp)’
mtools-4.0.48/charsetConv.c:128:11: branch_false: following ‘false’ branch (when ‘codepage <= 9999’)...
mtools-4.0.48/charsetConv.c:133:12: branch_false: ...to here
mtools-4.0.48/charsetConv.c:133:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:136:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:138:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:144:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:145:17: acquire_memory: allocated here
mtools-4.0.48/charsetConv.c:146:11: danger: ‘iconv_open(&dosCp, wcharCp)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
mtools-4.0.48/charsetConv.c:151:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(&dosCp, wcharCp)’
mtools-4.0.48/charsetConv.c:128:11: branch_false: following ‘false’ branch (when ‘codepage <= 9999’)...
mtools-4.0.48/charsetConv.c:133:12: branch_false: ...to here
mtools-4.0.48/charsetConv.c:133:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:136:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:138:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:144:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:146:11: branch_true: following ‘true’ branch...
mtools-4.0.48/charsetConv.c:148:17: branch_true: ...to here
mtools-4.0.48/charsetConv.c:149:25: acquire_memory: allocated here
mtools-4.0.48/charsetConv.c:151:11: danger: ‘iconv_open(&dosCp, wcharCp)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
mtools-4.0.48/charsetConv.c:159:11: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(wcharCp, & dosCp)’
mtools-4.0.48/charsetConv.c:128:11: branch_false: following ‘false’ branch (when ‘codepage <= 9999’)...
mtools-4.0.48/charsetConv.c:133:12: branch_false: ...to here
mtools-4.0.48/charsetConv.c:133:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:136:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:137:16: acquire_memory: allocated here
mtools-4.0.48/charsetConv.c:138:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:144:9: branch_false: ...to here
mtools-4.0.48/charsetConv.c:146:11: branch_false: following ‘false’ branch...
mtools-4.0.48/charsetConv.c:158:15: branch_false: ...to here
mtools-4.0.48/charsetConv.c:159:11: danger: ‘iconv_open(wcharCp, & dosCp)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
mtools-4.0.48/charsetConv.c:209:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mangled’
mtools-4.0.48/charsetConv.c:384:8: enter_function: entry to ‘wchar_to_native’
mtools-4.0.48/charsetConv.c:394:9: call_function: calling ‘initialize_to_native’ from ‘wchar_to_native’
mtools-4.0.48/charsetConv.c:394:9: return_function: returning to ‘wchar_to_native’ from ‘initialize_to_native’
mtools-4.0.48/charsetConv.c:396:11: call_function: calling ‘safe_iconv’ from ‘wchar_to_native’
Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
mtools-4.0.48/charsetConv.c:229:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*mangled’
mtools-4.0.48/charsetConv.c:384:8: enter_function: entry to ‘wchar_to_native’
mtools-4.0.48/charsetConv.c:394:9: call_function: calling ‘initialize_to_native’ from ‘wchar_to_native’
mtools-4.0.48/charsetConv.c:394:9: return_function: returning to ‘wchar_to_native’ from ‘initialize_to_native’
mtools-4.0.48/charsetConv.c:396:11: call_function: calling ‘safe_iconv’ from ‘wchar_to_native’
Error: CPPCHECK_WARNING (CWE-401): [#def13]
mtools-4.0.48/config.c:456: error[memleakOnRealloc]: Common realloc mistake: 'devices' nulled but not freed upon failure
Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
mtools-4.0.48/expand.c:33:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
mtools-4.0.48/expand.c:32:11: branch_false: following ‘false’ branch...
mtools-4.0.48/expand.c:35:21: branch_false: ...to here
mtools-4.0.48/expand.c:33:24: danger: ‘pipefd[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
mtools-4.0.48/expand.c:33:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
mtools-4.0.48/expand.c:32:11: branch_false: following ‘false’ branch...
mtools-4.0.48/expand.c:35:21: branch_false: ...to here
mtools-4.0.48/expand.c:33:24: danger: ‘pipefd[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
mtools-4.0.48/expand.c:43:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup(pipefd[1])’
mtools-4.0.48/expand.c:32:11: branch_false: following ‘false’ branch...
mtools-4.0.48/expand.c:35:21: branch_false: ...to here
mtools-4.0.48/expand.c:43:28: acquire_resource: opened here
mtools-4.0.48/expand.c:43:27: danger: ‘dup(pipefd[1])’ leaks here; was opened at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
mtools-4.0.48/fat.c:186:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*This.sector_size * 64)’
mtools-4.0.48/fat.c:753:5: enter_function: entry to ‘fat_read’
mtools-4.0.48/fat.c:762:9: branch_true: following ‘true’ branch...
mtools-4.0.48/fat.c:763:11: branch_true: ...to here
mtools-4.0.48/fat.c:763:11: branch_true: following ‘true’ branch...
mtools-4.0.48/fat.c:764:24: branch_true: ...to here
mtools-4.0.48/fat.c:764:24: call_function: calling ‘old_fat_read’ from ‘fat_read’
Error: CPPCHECK_WARNING (CWE-401): [#def18]
mtools-4.0.48/init.c:520: error[memleak]: Memory leak: This
Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
mtools-4.0.48/init.c:610:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.48/init.c:603:6: enter_function: entry to ‘getDrive’
mtools-4.0.48/init.c:607:11: branch_true: following ‘true’ branch...
branch_true: ...to here
mtools-4.0.48/init.c:608:24: call_function: inlined call to ‘GetFs’ from ‘getDrive’
mtools-4.0.48/init.c:610:24: danger: dereference of NULL ‘Stream’
Error: CPPCHECK_WARNING (CWE-476): [#def20]
mtools-4.0.48/mainloop.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: name
Error: CPPCHECK_WARNING (CWE-562): [#def21]
mtools-4.0.48/mainloop.c:262: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
mtools-4.0.48/mbadblocks.c:220:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:174:11: branch_false: following ‘false’ branch (when ‘writeMode == 0’)...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_resource: opened here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
mtools-4.0.48/mbadblocks.c:220:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:174:11: branch_false: following ‘false’ branch (when ‘writeMode == 0’)...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_memory: allocated here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
mtools-4.0.48/mbadblocks.c:226:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:174:11: branch_false: following ‘false’ branch (when ‘writeMode == 0’)...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_resource: opened here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: branch_true: following ‘true’ branch...
mtools-4.0.48/mbadblocks.c:221:44: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:226:33: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(23)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
mtools-4.0.48/mbadblocks.c:226:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:174:11: branch_false: following ‘false’ branch (when ‘writeMode == 0’)...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_memory: allocated here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: branch_true: following ‘true’ branch...
mtools-4.0.48/mbadblocks.c:221:44: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:226:33: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def26]
mtools-4.0.48/mbadblocks.c:227:45: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_resource: opened here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: branch_true: following ‘true’ branch...
mtools-4.0.48/mbadblocks.c:221:44: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:227:45: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(21)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/20)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
mtools-4.0.48/mbadblocks.c:227:45: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
mtools-4.0.48/mbadblocks.c:111:6: enter_function: entry to ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:125:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
mtools-4.0.48/mbadblocks.c:126:17: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:131:25: call_function: inlined call to ‘checkListTwice’ from ‘mbadblocks’
mtools-4.0.48/mbadblocks.c:132:36: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:18: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:156:33: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:155:13: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:161:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:166:22: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:169:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:174:11: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:186:18: branch_false: following ‘false’ branch...
mtools-4.0.48/mbadblocks.c:203:19: branch_false: ...to here
mtools-4.0.48/mbadblocks.c:210:11: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
mtools-4.0.48/mbadblocks.c:213:27: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:213:27: acquire_memory: allocated here
mtools-4.0.48/mbadblocks.c:214:19: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mbadblocks.c:220:23: branch_true: following ‘true’ branch...
mtools-4.0.48/mbadblocks.c:221:44: branch_true: ...to here
mtools-4.0.48/mbadblocks.c:227:45: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
mtools-4.0.48/mcat.c:132:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.48/mcat.c:52:6: enter_function: entry to ‘mcat’
mtools-4.0.48/mcat.c:69:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
branch_false: ...to here
mtools-4.0.48/mcat.c:86:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:88:11: branch_false: ...to here
mtools-4.0.48/mcat.c:98:9: release_memory: ‘Stream’ is NULL
mtools-4.0.48/mcat.c:99:27: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:118:14: branch_false: ...to here
mtools-4.0.48/mcat.c:118:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:121:12: branch_false: ...to here
mtools-4.0.48/mcat.c:121:12: branch_true: following ‘true’ branch (when ‘mode == 1’)...
mtools-4.0.48/mcat.c:124:20: branch_true: ...to here
mtools-4.0.48/mcat.c:124:19: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:125:20: branch_false: ...to here
mtools-4.0.48/mcat.c:124:20: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:128:41: branch_false: ...to here
mtools-4.0.48/mcat.c:129:31: call_function: inlined call to ‘bufLen’ from ‘mcat’
mtools-4.0.48/mcat.c:129:31: branch_true: ...to here
mtools-4.0.48/mcat.c:129:24: branch_true: following ‘true’ branch...
mtools-4.0.48/mcat.c:132:37: branch_true: ...to here
mtools-4.0.48/mcat.c:132:37: release_memory: ‘Stream’ is NULL
mtools-4.0.48/mcat.c:132:37: danger: dereference of NULL ‘Stream’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
mtools-4.0.48/mcat.c:140:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Stream’
mtools-4.0.48/mcat.c:69:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
branch_false: ...to here
mtools-4.0.48/mcat.c:86:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:88:11: branch_false: ...to here
mtools-4.0.48/mcat.c:98:9: release_memory: ‘Stream’ is NULL
mtools-4.0.48/mcat.c:99:27: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:118:14: branch_false: ...to here
mtools-4.0.48/mcat.c:118:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mcat.c:121:12: branch_false: ...to here
mtools-4.0.48/mcat.c:121:12: branch_false: following ‘false’ branch (when ‘mode != 1’)...
branch_false: ...to here
mtools-4.0.48/mcat.c:140:31: release_memory: ‘Stream’ is NULL
mtools-4.0.48/mcat.c:140:31: danger: dereference of NULL ‘Stream’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def30]
mtools-4.0.48/mcopy.c:136:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*arg.unixTarget’ where non-null expected
mtools-4.0.48/mcopy.c:134:27: acquire_memory: this call could return NULL
mtools-4.0.48/mcopy.c:136:12: danger: argument 1 (‘strdup(in)’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-688): [#def31]
mtools-4.0.48/mcopy.c:136:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘arg.unixTarget’ where non-null expected
mtools-4.0.48/mcopy.c:594:6: enter_function: entry to ‘mcopy’
mtools-4.0.48/mcopy.c:614:11: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/mcopy.c:668:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mcopy.c:671:9: branch_false: ...to here
mtools-4.0.48/mcopy.c:681:11: branch_true: following ‘true’ branch (when ‘mtype == 0’)...
mtools-4.0.48/mcopy.c:681:34: branch_true: ...to here
mtools-4.0.48/mcopy.c:681:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
mtools-4.0.48/mcopy.c:693:21: branch_false: ...to here
mtools-4.0.48/mcopy.c:703:20: call_function: calling ‘target_lookup’ from ‘mcopy’
Error: GCC_ANALYZER_WARNING (CWE-415): [#def32]
mtools-4.0.48/mdir.c:305:25: warning[-Wanalyzer-double-free]: double-‘free’ of ‘dynDirPath’
mtools-4.0.48/mdir.c:460:12: enter_function: entry to ‘list_non_recurs_directory’
mtools-4.0.48/mdir.c:473:19: call_function: calling ‘enterDirectory’ from ‘list_non_recurs_directory’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
mtools-4.0.48/mk_direntry.c:571:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argname’
mtools-4.0.48/mk_direntry.c:646:5: enter_function: entry to ‘mwrite_one’
mtools-4.0.48/mk_direntry.c:657:11: branch_true: following ‘true’ branch (when ‘_argname’ is non-NULL)...
mtools-4.0.48/mk_direntry.c:658:27: branch_true: ...to here
mtools-4.0.48/mk_direntry.c:658:27: acquire_memory: allocated here
mtools-4.0.48/mk_direntry.c:661:11: branch_true: following ‘true’ branch (when ‘_shortname’ is non-NULL)...
mtools-4.0.48/mk_direntry.c:662:29: branch_true: ...to here
mtools-4.0.48/mk_direntry.c:665:15: call_function: calling ‘mt_mwrite_one’ from ‘mwrite_one’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
mtools-4.0.48/mk_direntry.c:571:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘argname’
mtools-4.0.48/mk_direntry.c:646:5: enter_function: entry to ‘mwrite_one’
mtools-4.0.48/mk_direntry.c:657:11: branch_true: following ‘true’ branch (when ‘_argname’ is non-NULL)...
mtools-4.0.48/mk_direntry.c:658:27: branch_true: ...to here
mtools-4.0.48/mk_direntry.c:658:27: acquire_memory: this call could return NULL
mtools-4.0.48/mk_direntry.c:661:11: branch_true: following ‘true’ branch (when ‘_shortname’ is non-NULL)...
mtools-4.0.48/mk_direntry.c:662:29: branch_true: ...to here
mtools-4.0.48/mk_direntry.c:665:15: call_function: calling ‘mt_mwrite_one’ from ‘mwrite_one’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
mtools-4.0.48/mmount.c:71:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
mtools-4.0.48/mmount.c:35:6: enter_function: entry to ‘mmount’
mtools-4.0.48/mmount.c:46:12: branch_false: following ‘false’ branch...
mtools-4.0.48/mmount.c:52:11: branch_false: following ‘false’ branch...
mtools-4.0.48/mmount.c:54:9: branch_false: ...to here
mtools-4.0.48/mmount.c:71:17: danger: leaks here
Error: COMPILER_WARNING (CWE-252): [#def36]
mtools-4.0.48/privileges.c: scope_hint: In function ‘Setuid’
mtools-4.0.48/privileges.c:98:17: warning[-Wunused-result]: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def37]
mtools-4.0.48/privileges.c:104:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def38]
mtools-4.0.48/privileges.c: scope_hint: In function ‘reclaim_privs’
mtools-4.0.48/privileges.c:114:9: warning[-Wunused-result]: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def39]
mtools-4.0.48/privileges.c: scope_hint: In function ‘drop_privs’
mtools-4.0.48/privileges.c:122:9: warning[-Wunused-result]: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def40]
mtools-4.0.48/privileges.c: scope_hint: In function ‘destroy_privs’
mtools-4.0.48/privileges.c:132:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def41]
mtools-4.0.48/privileges.c:133:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def42]
mtools-4.0.48/privileges.c:135:17: warning[-Wunused-result]: ignoring return value of ‘seteuid’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def43]
mtools-4.0.48/privileges.c: scope_hint: In function ‘init_privs’
mtools-4.0.48/privileges.c:183:17: warning[-Wunused-result]: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’
Error: CPPCHECK_WARNING (CWE-476): [#def44]
mtools-4.0.48/swap.c:32: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
mtools-4.0.48/swap.c:32:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
mtools-4.0.48/swap.c:51:16: enter_function: entry to ‘swap_pwrite’
mtools-4.0.48/swap.c:57:26: acquire_memory: this call could return NULL
mtools-4.0.48/swap.c:59:9: call_function: calling ‘swap_buffer’ from ‘swap_pwrite’
Error: CPPCHECK_WARNING (CWE-476): [#def46]
mtools-4.0.48/swap.c:33: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
Error: CPPCHECK_WARNING (CWE-476): [#def47]
mtools-4.0.48/swap.c:34: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
Error: CPPCHECK_WARNING (CWE-476): [#def48]
mtools-4.0.48/swap.c:58: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: swapping
Error: GCC_ANALYZER_WARNING (CWE-688): [#def49]
mtools-4.0.48/tty.c:221:33: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
mtools-4.0.48/tty.c:206:5: enter_function: entry to ‘ask_confirmation’
mtools-4.0.48/tty.c:211:13: call_function: calling ‘opentty’ from ‘ask_confirmation’
mtools-4.0.48/tty.c:211:13: return_function: returning to ‘ask_confirmation’ from ‘opentty’
mtools-4.0.48/tty.c:211:11: branch_false: following ‘false’ branch...
branch_false: ...to here
mtools-4.0.48/tty.c:219:17: call_function: calling ‘opentty’ from ‘ask_confirmation’
mtools-4.0.48/tty.c:219:17: return_function: returning to ‘ask_confirmation’ from ‘opentty’
mtools-4.0.48/tty.c:220:20: branch_true: following ‘true’ branch...
mtools-4.0.48/tty.c:221:33: branch_true: ...to here
mtools-4.0.48/tty.c:221:33: danger: argument 1 (‘opentty(1)’) NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def50]
mtools-4.0.48/unixdir.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: This
Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
mtools-4.0.48/unixdir.c:158:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘This’
mtools-4.0.48/unixdir.c:156:16: acquire_memory: this call could return NULL
mtools-4.0.48/unixdir.c:158:9: danger: ‘This’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-476): [#def52]
mtools-4.0.48/unixdir.c:159: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: This
Error: CPPCHECK_WARNING (CWE-476): [#def53]
mtools-4.0.48/unixdir.c:163: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: This
Error: GCC_ANALYZER_WARNING (CWE-457): [#def54]
mtools-4.0.48/vfat.c:420:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*v.sum’
mtools-4.0.48/vfat.c:730:32: enter_function: entry to ‘vfat_lookup_loop_for_insert’
mtools-4.0.48/vfat.c:743:23: call_function: calling ‘vfat_lookup_loop_common’ from ‘vfat_lookup_loop_for_insert’
Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
mtools-4.0.48/vfat.c:845:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
mtools-4.0.48/vfat.c:790:5: enter_function: entry to ‘lookupForInsert’
mtools-4.0.48/vfat.c:821:11: branch_false: following ‘false’ branch...
mtools-4.0.48/vfat.c:826:11: branch_false: ...to here
mtools-4.0.48/vfat.c:844:23: call_function: calling ‘vfat_lookup_loop_for_insert’ from ‘lookupForInsert’
mtools-4.0.48/vfat.c:844:23: return_function: returning to ‘lookupForInsert’ from ‘vfat_lookup_loop_for_insert’
mtools-4.0.48/vfat.c:845:24: danger: dereference of NULL ‘vfat_lookup_loop_for_insert(*Dir_53(D)->Class.get_dosConvert(Dir), &entry, pos, allocDirCache(Dir, 1))’
Scan Properties
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
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-83.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | mtools-4.0.48-1.fc43 |
store-results-to | /tmp/tmpr0p2_41v/mtools-4.0.48-1.fc43.tar.xz |
time-created | 2025-04-25 14:28:34 |
time-finished | 2025-04-25 14:30:03 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpr0p2_41v/mtools-4.0.48-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpr0p2_41v/mtools-4.0.48-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |