Task #51918 - added.err

back to task #51918
download
Error: GCC_ANALYZER_WARNING (CWE-476):
diffutils-3.12/lib/exclude.c:604:7: warning[-Wanalyzer-null-dereference]: dereference of NULL 'buf'
diffutils-3.12/lib/exclude.c:657:1: enter_function: entry to 'add_exclude_file'
diffutils-3.12/lib/exclude.c:661:6: branch_false: following 'false' branch (when the strings are non-equal)...
diffutils-3.12/lib/exclude.c:664:14: branch_false: ...to here
diffutils-3.12/lib/exclude.c:665:6: branch_false: following 'false' branch...
diffutils-3.12/lib/exclude.c:667:12: branch_false: ...to here
diffutils-3.12/lib/exclude.c:667:12: call_function: calling 'add_exclude_fp' from 'add_exclude_file'
#  602|         if (buf_count == buf_alloc)
#  603|           buf = xpalloc (buf, &buf_alloc, 1, -1, 1);
#  604|->       buf[buf_count++] = c;
#  605|       }
#  606|   

Error: GCC_ANALYZER_WARNING (CWE-401):
diffutils-3.12/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)'
diffutils-3.12/lib/xmalloc.c:55:1: enter_function: entry to 'xcharalloc'
diffutils-3.12/lib/xmalloc.c:57:10: call_function: calling 'xmalloc' from 'xcharalloc'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401):
diffutils-3.12/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)'
diffutils-3.12/lib/xmalloc.c:312:1: enter_function: entry to 'xmemdup'
diffutils-3.12/lib/xmalloc.c:314:10: call_function: calling 'xmalloc' from 'xmemdup'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401):
diffutils-3.12/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)'
diffutils-3.12/lib/xmalloc.c:281:1: enter_function: entry to 'xzalloc'
diffutils-3.12/lib/xmalloc.c:283:10: call_function: calling 'xcalloc' from 'xzalloc'
#  296|   xcalloc (size_t n, size_t s)
#  297|   {
#  298|->   return check_nonnull (calloc (n, s));
#  299|   }
#  300|   

Error: CPPCHECK_WARNING (CWE-457):
diffutils-3.12/src/cmp.c:338: error[uninitvar]: Uninitialized variable: &nullstat
#  336|   	  && S_ISCHR (outstat.st_mode)
#  337|             && stat (NULL_DEVICE, &nullstat) == 0
#  338|-> 	  && same_file (&outstat, &nullstat))
#  339|           comparison_type = type_no_stdout;
#  340|       }

Error: GCC_ANALYZER_WARNING (CWE-401):
diffutils-3.12/src/diff.c:434:27: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
diffutils-3.12/src/diff.c:326:8: branch_true: following 'true' branch (when 'c >= 0')...
diffutils-3.12/src/diff.c:328:5: branch_true: ...to here
diffutils-3.12/src/diff.c:434:27: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.12/src/diff.c:436:20: branch_true: ...to here
diffutils-3.12/src/diff.c:434:27: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.12/src/diff.c:436:20: branch_true: ...to here
diffutils-3.12/src/diff.c:434:27: branch_true: following 'true' branch (when 'i != 104')...
diffutils-3.12/src/diff.c:436:20: branch_true: ...to here
diffutils-3.12/src/diff.c:434:27: branch_false: following 'false' branch (when 'i == 104')...
<unknown>: branch_false: ...to here
diffutils-3.12/src/diff.c:434:27: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  432|   	  int changes = 0;
#  433|   
#  434|-> 	  for (int i = 0; i < sizeof C_ifdef_group_formats; i++)
#  435|   	    {
#  436|   	      char ch = C_ifdef_group_formats[i];