diffutils-3.10-9.fc42
List of Findings
Error: CPPCHECK_WARNING (CWE-758): [#def1]
diffutils-3.10/lib/cmpbuf.c:107: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour
Error: COMPILER_WARNING (CWE-457): [#def2]
diffutils-3.10/lib/diffseq.h:430:36: warning[-Wmaybe-uninitialized]: 'fxbest' may be used uninitialized
diffutils-3.10/lib/diffseq.h: scope_hint: In function 'compareseq'
diffutils-3.10/lib/diffseq.h:386:18: note: 'fxbest' was declared here
Error: COMPILER_WARNING (CWE-457): [#def3]
diffutils-3.10/lib/diffseq.h:437:36: warning[-Wmaybe-uninitialized]: 'bxbest' may be used uninitialized
diffutils-3.10/lib/diffseq.h: scope_hint: In function 'compareseq'
diffutils-3.10/lib/diffseq.h:388:18: note: 'bxbest' was declared here
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
diffutils-3.10/lib/exclude.c:591:11: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(pattern)'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
diffutils-3.10/lib/ialloc.h:57:10: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s + 1)'
diffutils-3.10/lib/xmalloc.c:327:1: enter_function: entry to 'ximemdup0'
diffutils-3.10/lib/xmalloc.c:329:18: call_function: calling 'ximalloc' from 'ximemdup0'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
diffutils-3.10/lib/ialloc.h:57:10: warning[-Wanalyzer-malloc-leak]: leak of 'ximalloc(s)'
diffutils-3.10/lib/xmalloc.c:318:1: enter_function: entry to 'ximemdup'
diffutils-3.10/lib/xmalloc.c:320:18: call_function: calling 'ximalloc' from 'ximemdup'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
diffutils-3.10/lib/ialloc.h:93:10: warning[-Wanalyzer-malloc-leak]: leak of 'xicalloc(s, 1)'
diffutils-3.10/lib/xmalloc.c:287:1: enter_function: entry to 'xizalloc'
diffutils-3.10/lib/xmalloc.c:289:10: call_function: calling 'xicalloc' from 'xizalloc'
Error: CPPCHECK_WARNING (CWE-562): [#def8]
diffutils-3.10/lib/mktime.c:262: error[returnDanglingLifetime]: Returning pointer to local variable 'x' that will be invalid when returning.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
diffutils-3.10/lib/propername.c:59:10: warning[-Wanalyzer-malloc-leak]: leak of 'trim2(sub, 2)'
diffutils-3.10/lib/propername.c:187:1: enter_function: entry to 'proper_name_utf8'
diffutils-3.10/lib/propername.c:200:6: branch_false: following 'false' branch...
diffutils-3.10/lib/propername.c:247:10: branch_false: ...to here
diffutils-3.10/lib/propername.c:254:6: branch_true: following 'true' branch (when the strings are non-equal)...
diffutils-3.10/lib/propername.c:257:11: branch_true: ...to here
diffutils-3.10/lib/propername.c:257:11: call_function: calling 'mbsstr_trimmed_wordbounded' from 'proper_name_utf8'
Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
diffutils-3.10/lib/stdopen.c:40:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'new_fd'
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:51:46: acquire_resource: opened here
diffutils-3.10/lib/stdopen.c:55:14: branch_false: following 'false' branch (when 'new_fd <= 2')...
diffutils-3.10/lib/stdopen.c:40:48: branch_false: ...to here
diffutils-3.10/lib/stdopen.c:40:27: danger: 'new_fd' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
diffutils-3.10/lib/stdopen.c:52:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'new_fd'
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:52:38: acquire_resource: opened here
diffutils-3.10/lib/stdopen.c:53:14: branch_false: following 'false' branch...
diffutils-3.10/lib/stdopen.c:55:14: branch_false: ...to here
diffutils-3.10/lib/stdopen.c:55:14: branch_false: following 'false' branch (when 'new_fd <= 2')...
diffutils-3.10/lib/stdopen.c:40:48: branch_false: ...to here
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:52:24: danger: 'new_fd' leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
diffutils-3.10/lib/stdopen.c:55:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:51:25: branch_true: following 'true' branch (when 'fd == 0')...
diffutils-3.10/lib/stdopen.c:51:46: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:51:46: acquire_resource: opened here
diffutils-3.10/lib/stdopen.c:55:14: branch_false: following 'false' branch (when 'new_fd <= 2')...
diffutils-3.10/lib/stdopen.c:40:48: branch_false: ...to here
diffutils-3.10/lib/stdopen.c:40:27: branch_true: following 'true' branch (when 'fd != 3')...
diffutils-3.10/lib/stdopen.c:42:11: branch_true: ...to here
diffutils-3.10/lib/stdopen.c:53:14: branch_false: following 'false' branch...
diffutils-3.10/lib/stdopen.c:55:14: branch_false: ...to here
diffutils-3.10/lib/stdopen.c:55:14: danger: leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
diffutils-3.10/lib/striconv.c:299:31: warning[-Wanalyzer-malloc-leak]: leak of 'str_cd_iconv(src, iconv_open(to_codeset, from_codeset))'
diffutils-3.10/lib/striconv.c:393:1: enter_function: entry to 'str_iconv'
diffutils-3.10/lib/striconv.c:395:6: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:420:10: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:423:16: branch_false: ...to here
diffutils-3.10/lib/striconv.c:423:16: acquire_memory: allocated here
diffutils-3.10/lib/striconv.c:423:16: call_function: calling 'str_cd_iconv' from 'str_iconv'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
diffutils-3.10/lib/striconv.c:338:31: warning[-Wanalyzer-malloc-leak]: leak of 'str_cd_iconv(src, iconv_open(to_codeset, from_codeset))'
diffutils-3.10/lib/striconv.c:393:1: enter_function: entry to 'str_iconv'
diffutils-3.10/lib/striconv.c:395:6: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:420:10: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:423:16: branch_false: ...to here
diffutils-3.10/lib/striconv.c:423:16: acquire_memory: allocated here
diffutils-3.10/lib/striconv.c:423:16: call_function: calling 'str_cd_iconv' from 'str_iconv'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
diffutils-3.10/lib/striconv.c:367:6: warning[-Wanalyzer-malloc-leak]: leak of 'str_cd_iconv(src, iconv_open(to_codeset, from_codeset))'
diffutils-3.10/lib/striconv.c:393:1: enter_function: entry to 'str_iconv'
diffutils-3.10/lib/striconv.c:395:6: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:420:10: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:423:16: branch_false: ...to here
diffutils-3.10/lib/striconv.c:423:16: acquire_memory: allocated here
diffutils-3.10/lib/striconv.c:423:16: call_function: calling 'str_cd_iconv' from 'str_iconv'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
diffutils-3.10/lib/striconv.c:420:10: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(to_codeset, from_codeset)'
diffutils-3.10/lib/striconv.c:395:6: branch_false: following 'false' branch...
diffutils-3.10/lib/striconv.c:419:12: acquire_memory: allocated here
diffutils-3.10/lib/striconv.c:420:10: danger: 'iconv_open(to_codeset, from_codeset)' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
diffutils-3.10/lib/time_rz.c:68:22: warning[-Wanalyzer-malloc-leak]: leak of 'tzalloc(getenv("TZ"))'
diffutils-3.10/lib/./time.h:953:1: enter_function: entry to 'mktime_z'
diffutils-3.10/lib/time_rz.c:287:6: branch_false: following 'false' branch (when 'tz' is non-NULL)...
diffutils-3.10/lib/time_rz.c:291:27: branch_false: ...to here
diffutils-3.10/lib/time_rz.c:291:27: call_function: calling 'set_tz' from 'mktime_z'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
diffutils-3.10/lib/time_rz.c:210:9: warning[-Wanalyzer-malloc-leak]: leak of 'set_tz(tz)'
diffutils-3.10/lib/./time.h:953:1: enter_function: entry to 'mktime_z'
diffutils-3.10/lib/time_rz.c:287:6: branch_false: following 'false' branch (when 'tz' is non-NULL)...
diffutils-3.10/lib/time_rz.c:291:27: branch_false: ...to here
diffutils-3.10/lib/time_rz.c:291:27: call_function: calling 'set_tz' from 'mktime_z'
diffutils-3.10/lib/time_rz.c:291:27: return_function: returning to 'mktime_z' from 'set_tz'
diffutils-3.10/lib/time_rz.c:292:10: branch_true: following 'true' branch...
diffutils-3.10/lib/time_rz.c:295:25: branch_true: ...to here
diffutils-3.10/lib/time_rz.c:306:16: branch_false: following 'false' branch...
branch_false: ...to here
diffutils-3.10/lib/time_rz.c:210:9: danger: 'set_tz(tz)' leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
diffutils-3.10/lib/time_rz.c:211:10: warning[-Wanalyzer-malloc-leak]: leak of 'set_tz(tz)'
diffutils-3.10/lib/./time.h:953:1: enter_function: entry to 'mktime_z'
diffutils-3.10/lib/time_rz.c:287:6: branch_false: following 'false' branch (when 'tz' is non-NULL)...
diffutils-3.10/lib/time_rz.c:291:27: branch_false: ...to here
diffutils-3.10/lib/time_rz.c:291:27: call_function: calling 'set_tz' from 'mktime_z'
diffutils-3.10/lib/time_rz.c:291:27: return_function: returning to 'mktime_z' from 'set_tz'
diffutils-3.10/lib/time_rz.c:292:10: branch_true: following 'true' branch...
diffutils-3.10/lib/time_rz.c:295:25: branch_true: ...to here
diffutils-3.10/lib/time_rz.c:211:10: danger: 'set_tz(tz)' leaks here; was allocated at [(10)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/9)
Error: CPPCHECK_WARNING (CWE-252): [#def20]
diffutils-3.10/lib/xfreopen.c:31: error[leakReturnValNotUsed]: Return value of allocation function 'freopen' is not stored.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
diffutils-3.10/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)'
diffutils-3.10/lib/xmalloc.c:55:1: enter_function: entry to 'xcharalloc'
diffutils-3.10/lib/xmalloc.c:57:10: call_function: calling 'xmalloc' from 'xcharalloc'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
diffutils-3.10/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)'
diffutils-3.10/lib/xmalloc.c:312:1: enter_function: entry to 'xmemdup'
diffutils-3.10/lib/xmalloc.c:314:18: call_function: calling 'xmalloc' from 'xmemdup'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
diffutils-3.10/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)'
diffutils-3.10/lib/xmalloc.c:281:1: enter_function: entry to 'xzalloc'
diffutils-3.10/lib/xmalloc.c:283:10: call_function: calling 'xcalloc' from 'xzalloc'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
diffutils-3.10/lib/xmalloc.c:314:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmemdup(string, strlen(string) + 1)'
diffutils-3.10/lib/xmalloc.c:337:1: enter_function: entry to 'xstrdup'
diffutils-3.10/lib/xmalloc.c:339:10: call_function: calling 'xmemdup' from 'xstrdup'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
diffutils-3.10/src/../lib/diffseq.h:274:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
diffutils-3.10/src/../lib/diffseq.h:392:26: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
diffutils-3.10/src/../lib/diffseq.h:429:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'fxbest'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-457): [#def28]
diffutils-3.10/src/../lib/diffseq.h:436:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'bxbest'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
diffutils-3.10/src/../lib/diffseq.h:500:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
diffutils-3.10/src/../lib/diffseq.h:511:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.10/src/analyze.c:463:1: enter_function: entry to 'diff_2_files'
diffutils-3.10/src/analyze.c:477:6: branch_false: following 'false' branch...
diffutils-3.10/src/analyze.c:545:18: branch_false: ...to here
diffutils-3.10/src/analyze.c:554:7: call_function: calling 'discard_confusing_lines' from 'diff_2_files'
diffutils-3.10/src/analyze.c:554:7: return_function: returning to 'diff_2_files' from 'discard_confusing_lines'
diffutils-3.10/src/analyze.c:581:7: call_function: calling 'compareseq' from 'diff_2_files'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
diffutils-3.10/src/diff.c:436:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.10/src/diff.c:325:10: branch_true: following 'true' branch (when 'c != -1')...
diffutils-3.10/src/diff.c:327:7: branch_true: ...to here
diffutils-3.10/src/diff.c:427:16: branch_false: following 'false' branch...
diffutils-3.10/src/diff.c:428:20: branch_false: ...to here
diffutils-3.10/src/diff.c:427:17: branch_false: following 'false' branch...
diffutils-3.10/src/diff.c:432:23: branch_false: ...to here
diffutils-3.10/src/diff.c:436:25: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.10/src/diff.c:438:22: branch_true: ...to here
diffutils-3.10/src/diff.c:436:25: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.10/src/diff.c:438:22: branch_true: ...to here
diffutils-3.10/src/diff.c:436:25: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.10/src/diff.c:438:22: branch_true: ...to here
diffutils-3.10/src/diff.c:436:25: branch_false: following 'false' branch (when 'i == 104')...
branch_false: ...to here
diffutils-3.10/src/diff.c:436:25: danger: '<unknown>' leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
diffutils-3.10/src/diff.c:932:11: warning[-Wanalyzer-malloc-leak]: leak of '**reglist.buf.fastmap'
diffutils-3.10/src/diff.c:928:6: branch_true: following 'true' branch...
diffutils-3.10/src/diff.c:931:7: branch_true: ...to here
diffutils-3.10/src/diff.c:932:11: danger: '**reglist.buf.fastmap' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: COMPILER_WARNING (CWE-9001): [#def33]
diffutils-3.10/src/diff.h:406:1: warning[-Wattributes]: '[pure](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute)' attribute ignored
Error: COMPILER_WARNING (CWE-9001): [#def34]
diffutils-3.10/src/analyze.c:21: included_from: Included from here.
diffutils-3.10/src/diff.h:406:1: warning[-Wattributes]: 'pure' attribute ignored
Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
diffutils-3.10/src/diff3.c:930:37: warning[-Wanalyzer-malloc-leak]: leak of 'create_diff3_block(low[0], high[0], low[1], high[1], lowc, highc)'
diffutils-3.10/src/diff3.c:754:1: enter_function: entry to 'using_to_diff3_block'
diffutils-3.10/src/diff3.c:773:15: branch_true: following 'true' branch (when 'd != 2')...
diffutils-3.10/src/diff3.c:774:14: branch_true: ...to here
diffutils-3.10/src/diff3.c:786:12: call_function: calling 'create_diff3_block' from 'using_to_diff3_block'
diffutils-3.10/src/diff3.c:786:12: return_function: returning to 'using_to_diff3_block' from 'create_diff3_block'
diffutils-3.10/src/diff3.c:791:15: branch_true: following 'true' branch (when 'd != 2')...
diffutils-3.10/src/diff3.c:792:21: branch_true: ...to here
diffutils-3.10/src/diff3.c:792:26: branch_true: following 'true' branch (when 'ptr' is non-NULL)...
diffutils-3.10/src/diff3.c:794:29: branch_true: ...to here
diffutils-3.10/src/diff3.c:930:37: danger: 'create_diff3_block(low[0], high[0], low[1], high[1], lowc, highc)' leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
diffutils-3.10/src/diff3.c:939:14: warning[-Wanalyzer-malloc-leak]: leak of 'create_diff3_block(low[0], high[0], low[1], high[1], lowc, highc)'
diffutils-3.10/src/diff3.c:754:1: enter_function: entry to 'using_to_diff3_block'
diffutils-3.10/src/diff3.c:773:15: branch_true: following 'true' branch (when 'd != 2')...
diffutils-3.10/src/diff3.c:774:14: branch_true: ...to here
diffutils-3.10/src/diff3.c:786:12: call_function: calling 'create_diff3_block' from 'using_to_diff3_block'
diffutils-3.10/src/diff3.c:786:12: return_function: returning to 'using_to_diff3_block' from 'create_diff3_block'
diffutils-3.10/src/diff3.c:791:15: branch_true: following 'true' branch (when 'd != 2')...
diffutils-3.10/src/diff3.c:792:21: branch_true: ...to here
diffutils-3.10/src/diff3.c:792:26: branch_true: following 'true' branch (when 'ptr' is non-NULL)...
diffutils-3.10/src/diff3.c:794:29: branch_true: ...to here
diffutils-3.10/src/diff3.c:939:14: danger: 'create_diff3_block(low[0], high[0], low[1], high[1], lowc, highc)' leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
diffutils-3.10/src/diff3.c:1142:7: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(72)'
diffutils-3.10/src/diff3.c:990:1: enter_function: entry to 'process_diff'
diffutils-3.10/src/diff3.c:1002:16: call_function: calling 'read_diff' from 'process_diff'
diffutils-3.10/src/diff3.c:1002:16: return_function: returning to 'process_diff' from 'read_diff'
diffutils-3.10/src/diff3.c:1006:10: branch_true: following 'true' branch...
diffutils-3.10/src/diff3.c:1008:33: branch_true: ...to here
diffutils-3.10/src/diff3.c:1012:12: call_function: calling 'process_diff_control' from 'process_diff'
diffutils-3.10/src/diff3.c:1012:12: return_function: returning to 'process_diff' from 'process_diff_control'
diffutils-3.10/src/diff3.c:1142:7: danger: 'xmalloc(72)' leaks here; was allocated at [(24)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/23)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def38]
diffutils-3.10/src/dir.c:249:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'dirdata[i].nnames'
diffutils-3.10/src/dir.c:212:1: enter_function: entry to 'diff_dirs'
diffutils-3.10/src/dir.c:229:15: branch_true: following 'true' branch (when 'i != 2')...
diffutils-3.10/src/dir.c:230:11: branch_true: ...to here
diffutils-3.10/src/dir.c:230:11: call_function: calling 'dir_read' from 'diff_dirs'
diffutils-3.10/src/dir.c:230:11: return_function: returning to 'diff_dirs' from 'dir_read'
diffutils-3.10/src/dir.c:230:8: branch_false: following 'false' branch...
diffutils-3.10/src/dir.c:232:27: branch_false: ...to here
diffutils-3.10/src/dir.c:229:15: branch_true: following 'true' branch (when 'i != 2')...
diffutils-3.10/src/dir.c:230:11: branch_true: ...to here
diffutils-3.10/src/dir.c:230:11: call_function: calling 'dir_read' from 'diff_dirs'
diffutils-3.10/src/dir.c:230:11: return_function: returning to 'diff_dirs' from 'dir_read'
diffutils-3.10/src/dir.c:230:8: branch_false: following 'false' branch...
diffutils-3.10/src/dir.c:232:27: branch_false: ...to here
diffutils-3.10/src/dir.c:229:15: branch_false: following 'false' branch (when 'i == 2')...
diffutils-3.10/src/dir.c:236:7: branch_false: ...to here
diffutils-3.10/src/dir.c:236:6: branch_true: following 'true' branch...
diffutils-3.10/src/dir.c:239:18: branch_true: ...to here
diffutils-3.10/src/dir.c:244:10: branch_false: following 'false' branch...
branch_false: ...to here
diffutils-3.10/src/dir.c:248:19: branch_true: following 'true' branch (when 'i != 2')...
diffutils-3.10/src/dir.c:249:9: branch_true: ...to here
diffutils-3.10/src/dir.c:249:9: danger: use of uninitialized value 'dirdata[i].nnames' here
Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
diffutils-3.10/src/io.c:1060:3: warning[-Wanalyzer-malloc-leak]: leak of 'xnmalloc((long unsigned int)__real__ <unknown>, 8)'
diffutils-3.10/src/io.c:1089:1: enter_function: entry to 'read_files'
diffutils-3.10/src/io.c:1095:6: branch_true: following 'true' branch...
diffutils-3.10/src/io.c:1096:41: branch_true: ...to here
diffutils-3.10/src/io.c:1096:23: call_function: calling 'sip' from 'read_files'
diffutils-3.10/src/io.c:1096:23: return_function: returning to 'read_files' from 'sip'
diffutils-3.10/src/io.c:1103:6: branch_false: following 'false' branch (when 'appears_binary == 0')...
diffutils-3.10/src/io.c:1110:3: branch_false: ...to here
diffutils-3.10/src/io.c:1110:3: call_function: calling 'find_identical_ends' from 'read_files'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
diffutils-3.10/src/io.c:1065:1: warning[-Wanalyzer-malloc-leak]: leak of 'linbuf0'
diffutils-3.10/src/io.c:1089:1: enter_function: entry to 'read_files'
diffutils-3.10/src/io.c:1095:6: branch_true: following 'true' branch...
diffutils-3.10/src/io.c:1096:41: branch_true: ...to here
diffutils-3.10/src/io.c:1096:23: call_function: calling 'sip' from 'read_files'
diffutils-3.10/src/io.c:1096:23: return_function: returning to 'read_files' from 'sip'
diffutils-3.10/src/io.c:1103:6: branch_false: following 'false' branch (when 'appears_binary == 0')...
diffutils-3.10/src/io.c:1110:3: branch_false: ...to here
diffutils-3.10/src/io.c:1110:3: call_function: calling 'find_identical_ends' from 'read_files'
Error: COMPILER_WARNING (CWE-457): [#def41]
diffutils-3.10/src/sdiff.c: scope_hint: In function 'edit'
diffutils-3.10/src/sdiff.c:964:13: warning[-Wmaybe-uninitialized]: 'cmd1' may be used uninitialized
diffutils-3.10/src/sdiff.c:867:11: note: 'cmd1' was declared here
Error: COMPILER_WARNING (CWE-457): [#def42]
diffutils-3.10/src/util.c:1277:29: warning[-Wmaybe-uninitialized]: 'convfail1_bak' may be used uninitialized
Error: COMPILER_WARNING (CWE-457): [#def43]
diffutils-3.10/src/util.c:1277:44: warning[-Wmaybe-uninitialized]: 'convfail2_bak' may be used uninitialized
Error: COMPILER_WARNING (CWE-457): [#def44]
diffutils-3.10/src/util.c: scope_hint: In function 'lines_differ_multibyte'
diffutils-3.10/src/util.c:1397:41: warning[-Wmaybe-uninitialized]: 'wc1_bak' may be used uninitialized
diffutils-3.10/src/util.c:1274:21: note: 'wc1_bak' was declared here
Error: COMPILER_WARNING (CWE-457): [#def45]
diffutils-3.10/src/util.c:1407:44: warning[-Wmaybe-uninitialized]: 'wc2_bak' may be used uninitialized
diffutils-3.10/src/util.c:1274:30: note: 'wc2_bak' was declared here
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-220.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 | diffutils-3.10-9.fc42 |
| store-results-to | /tmp/tmpcxxtlyu4/diffutils-3.10-9.fc42.tar.xz |
| time-created | 2025-04-25 12:18:37 |
| time-finished | 2025-04-25 12:21:26 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpcxxtlyu4/diffutils-3.10-9.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcxxtlyu4/diffutils-3.10-9.fc42.src.rpm' |
| tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |